Re: Windows default locale vs initdb
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Noah Misch <noah@leadboat.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-07-19T02:46:48Z
Lists: pgsql-hackers
Attachments
- v2-0001-Default-to-BCP-47-locale-in-initdb-on-Windows.patch (text/x-patch) patch v2-0001
- v2-0002-Remove-support-for-old-Windows-locale-names.patch (text/x-patch) patch v2-0002
On Tue, Jul 19, 2022 at 10:58 AM Thomas Munro <thomas.munro@gmail.com> wrote: > Here's a patch. I added this to the next commitfest, and cfbot promptly told me about some warnings I needed to fix. That'll teach me to post a patch tested with "ci-os-only: windows". Looking more closely at some error messages that report GetLastError() where I'd mixed up %d and %lu, I see also that I didn't quite follow existing conventions for wording when reporting Windows error numbers, so I fixed that too. In the "startcreate" step on CI you can see that it says: The database cluster will be initialized with locale "en-US". The default database encoding has accordingly been set to "WIN1252". The default text search configuration will be set to "english". As for whether "accordingly" still applies, by the logic of of win32_langinfo()... Windows still considers WIN1252 to be the default ANSI code page for "en-US", though it'd work with UTF-8 too. I'm not sure what to make of that. The goal here was to give Windows users good defaults, but WIN1252 is probably not what most people actually want. Hmph.
Commits
-
Skip citext_utf8 test on Windows.
- cff4e5a36bfe 17.0 cited