initdb & locale weirdness

Aleksander Kmetec <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
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



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.