Skip to content

Commit db477b6

Browse files
committed
Deal with yet another issue related to "Norwegian (Bokmål)" locale.
It emerges that recent versions of Windows (at least 2016 Standard) spell this locale name as "Norwegian Bokmål_Norway.1252", defeating our mapping code that translates "Norwegian (Bokmål)_Norway" to something that's all-ASCII (cf commits db29620 and aa1d2fc). Add another mapping entry to handle this spelling. Per bug #16068 from Robert Ford. Like the previous patches, back-patch to all supported branches. Discussion: https://postgr.es/m/[email protected]
1 parent d995fd6 commit db477b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/port/win32setlocale.c

+4
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,12 @@ static const struct locale_map locale_map_result[] = {
9696
*
9797
* It's not clear what encoding setlocale() uses when it returns the
9898
* locale name, so to play it safe, we search for "Norwegian (Bok*l)".
99+
*
100+
* Just to make life even more complicated, some versions of Windows spell
101+
* the locale name without parentheses. Translate that too.
99102
*/
100103
{"Norwegian (Bokm", "l)_Norway", "Norwegian_Norway"},
104+
{"Norwegian Bokm", "l_Norway", "Norwegian_Norway"},
101105
{NULL, NULL, NULL}
102106
};
103107

0 commit comments

Comments
 (0)