- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit2049a7d
committed
Another attempt at fixing Windows Norwegian locale.
Previous fix mapped "Norwegian (Bokmål)" locale, which contains a non-ASCIIcharacter, to the pure ASCII alias "norwegian-bokmal". However, it turnsout that more recent versions of the CRT library, in particular MSVCR110(Visual Studio 2012), changed the behaviour of setlocale() so that ifyou pass "norwegian-bokmal" to setlocale, it returns "Norwegian_Norway".That meant trouble, when setlocale(..., NULL) first returned"Norwegian (Bokmål)_Norway", which we mapped to "norwegian-bokmal_Norway",but another call to setlocale(..., "norwegian-bokmal_Norway") returned"Norwegian_Norway". That caused PostgreSQL to think that they are differentlocales, and therefore not compatible. That caused initdb to fail atCREATE DATABASE.Older CRT versions seem to accept "Norwegian_Norway" too, so change themapping to return "Norwegian_Norway" instead of "norwegian-bokmal".Backpatch to 9.2 like the previous attempt. We haven't made a release thatincludes the previous fix yet, so we don't need to worry about changing thelocale of existing clusters from "norwegian-bokmal" to "Norwegian_Norway".(Doing any mapping like this at all requires changing the locale ofexisting databases; the release notes need to include instructions forthat).1 parenta10de35 commit2049a7d
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
|
0 commit comments
Comments
(0)