initdb & locale weirdness

From: Aleksander Kmetec <aleksander(dot)kmetec(at)intera(dot)si>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: initdb & locale weirdness
Date: 2004-08-17 14:39:40
Message-ID: 412218AC.1080307@intera.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

Hi all!

Has anyone managed to run initdb on Windows with a unicode locale?

On Windows, code for utf-8 is 65001, so the value passed to --locale
switch should look like language_country.65001 (Swedish_Sweden.65001,
German_Germany.65001, Slovenian_Slovenia.65001, ...). [*]

setlocale() accepts theese strings as valid LC_COLLATE values, but it
does not accept them as values for LC_CTYPE, which is used by initdb
function chklocale for checking if the passed string represents a valid
locale. This also makes it impossible to set lc_collate to such a value
using --lc-collate switch.

Can anyone else confirm this? Or am I just missing a language pack of
some sort? (unlinkely, I think; utf-8/65001 does show up as installed in
control panel -> regional settings). Non-unicode values seem to work
just fine.

I'm using PG 8.0 beta1 on windows 2000 SP4.

Regards,
Aleksander

[*] List of character set constants; utf-8 is the last one
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_81rn.asp

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-08-17 14:44:20 Re: libpq build problem with <io.h> on MS VC++
Previous Message Tom Lane 2004-08-17 14:34:32 Re: [PATCHES] libpq build problem with <io.h> on MS VC++