diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-10-21 14:18:01 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-10-21 14:18:55 -0400 |
commit | e3267407e2f9c30b6c94da25da8ba078dc144702 (patch) | |
tree | 26dd472ec182a679470e274a50364eae1a3002d3 | |
parent | 8835e0bd4e2d08f4930122cfc4268c8f6ea443b6 (diff) |
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 db29620d4 and aa1d2fc5e).
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/16068-4cb6eeaa7eb46d93@postgresql.org
-rw-r--r-- | src/port/win32setlocale.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/port/win32setlocale.c b/src/port/win32setlocale.c index ca9d5906975..22c834e8dcf 100644 --- a/src/port/win32setlocale.c +++ b/src/port/win32setlocale.c @@ -96,8 +96,12 @@ static const struct locale_map locale_map_result[] = { * * It's not clear what encoding setlocale() uses when it returns the * locale name, so to play it safe, we search for "Norwegian (Bok*l)". + * + * Just to make life even more complicated, some versions of Windows spell + * the locale name without parentheses. Translate that too. */ {"Norwegian (Bokm", "l)_Norway", "Norwegian_Norway"}, + {"Norwegian Bokm", "l_Norway", "Norwegian_Norway"}, {NULL, NULL, NULL} }; |