Re: Re: BUG #16068: Collate of 'Norwegian Bokmål' is problematic

Robert Ford <robfordww@gmail.com>

From: Robert Ford <robfordww@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2019-10-21T08:54:54Z
Lists: pgsql-bugs
Sorry about this, but the version was *"Windows 2016 standard*".  I let the
installer stay on "Default locale" while installing.  This results is a
config file with the following values:

# These settings are initialized by initdb, but they can be changed.
lc_messages = 'Norwegian Bokmål_Norway.1252' # locale for system error
message
# strings
lc_monetary = 'Norwegian Bokmål_Norway.1252' # locale for monetary
formatting
lc_numeric = 'Norwegian Bokmål_Norway.1252' # locale for number formatting
lc_time = 'Norwegian Bokmål_Norway.1252' # locale for time formatting

Then:

C:\Program Files\PostgreSQL\12\bin>psql postgres postgres
Password for user postgres:
psql (12.0)
WARNING: Console code page (850) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.


*postgres=# select * from pg_settings;ERROR:  invalid byte sequence for
encoding "UTF8": 0xe5 0x6c 0x5f*

søn. 20. okt. 2019 kl. 23:57 skrev Tom Lane <tgl@sss.pgh.pa.us>:

> [ please keep the list cc'd ]
>
> Robert Ford <robfordww@gmail.com> writes:
> > On Sat, Oct 19, 2019, 22:03 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>> The installer sets the Collate in the config file to 'Norwegian
> >>> Bokmål.1251' (or something similar, but notice the 'å')
>
> >> Um, Windows-what exactly?
> >> That collation name has given us trouble before, cf
> >>
> https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=db29620d4
> >>
> https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=aa1d2fc5e
> >> I wonder whether Microsoft changed it again :-(
>
> > Windows server 2012
>
> Hm, that's not very new, and it's certainly a version we've tested.
> In fact I'd have guessed the above-mentioned patches were tested
> against that.
>
> Anyway, my first thought about this is that the mapping installed by
> db29620d4 looks like it will recognize 'Norwegian (Bokmål)' but not
> 'Norwegian Bokmål'.  Could you be more precise about exactly what
> you're seeing in the config file?
>
>                         regards, tom lane
>

Commits

  1. Deal with yet another issue related to "Norwegian (Bokmål)" locale.