Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012 - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012
Date
Msg-id CA+hUKGLFcYKF2sCsaBqX-VWDdvU0XDcSm3wqji2E_CU22io80Q@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012  (Thomas Munro <thomas.munro@gmail.com>)
Responses AW: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012  ("ROSESOFT S. Hoffmann" <sh@rosesoft.de>)
List pgsql-bugs
On Tue, Jul 5, 2022 at 7:22 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Mon, Jul 4, 2022 at 11:53 PM ROSESOFT S. Hoffmann <sh@rosesoft.de> wrote:
> > On Windows Server 2016/2019/2022 and Windows 10/11 the ICU-Options work as expected!
> > Why does the problem only occurs on Windows Server 2012?
>
> Windows 10 and later contain a copy of ICU inside them.  That's why
> strings like "de", "de-CH" etc work there: PostgreSQL is using the
> normal Windows collation API (it's a bit weird that we call it "libc"
> mode, when it's not exactly libc, but what we mean by that is the OS's
> native collations...).  So I think it is probably Windows' internal
> copy of ICU that receives that name "de-..." and ignores the trailing
> part that it doesn't understand.

Oh, it might also be that ancient Windows can also understand "de-DE"
or "de" too, but not "de-x-icu"?  That "de-x-icu" name is an internal
PostgreSQL convention for collation identifiers and shouldn't be
passed to initdb.  If that's the case it might just be that the
ICU-based versions of Windows are more tolerant, and interpret
"de-x-icu" as "de", ignoring the rest, but the ancient versions reject
it?

(I have no access to old Windows, I just read that even Vista could
understand de-DE type names, formally known as BCP47, in some
contexts... it just wasn't using ICU yet).



pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012
Next
From: "ROSESOFT S. Hoffmann"
Date:
Subject: AW: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012