Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 17 Aug 2004 16:39:40 +0200
  • Message-id: <412218AC(dot)1080307(at)intera(dot)si>

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





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group