Re: Set LC_COLLATE to de_DE_phoneb - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: Set LC_COLLATE to de_DE_phoneb
Date
Msg-id 20100408102721.95EF.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Set LC_COLLATE to de_DE_phoneb  (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Set LC_COLLATE to de_DE_phoneb  (Frank Jagusch <frank@jagusch-online.de>)
List pgsql-hackers
Frank Jagusch <frank@jagusch-online.de> wrote:

> "de_DE_phoneb" is the name of an alternative sorting in german (only a
> few languages have alternate sorting). You may find some information
> when you search the MSDN for "de_DE_phoneb", i.e.
> http://msdn.microsoft.com/en-en/library/ms404373.aspx
> These alternate sorting is supported by the OS, but I don't know how it
> is supported in the msvcrt.

Hmmm, I found "de-DE_phoneb" in MSDN:
http://msdn.microsoft.com/en-us/library/dd374060
but setlocale("de-DE_phoneb") always fails at least on my machine.

The doc says "de-DE_phoneb" is a locale name for 
MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_GERMAN_PHONE_BOOK).
Some of native Win32 APIs could accept the locale and sort-order
combination, but setlocale() in CRT seems to reject it.

So, you could use the locale if you find a setlocale-compatible name of
"de-DE_phoneb". Or, you cannot use it, unless we modify PostgreSQL to
use Win32 locale functions instead of standard libc ones -- but it is
hardly acceptable.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Kiswono Prayogo
Date:
Subject: Re: [ADMIN] Compile Problem for Alpha 5 in /src/backend/utils/error/elog.c
Next
From: Robert Haas
Date:
Subject: Re: Remaining Streaming Replication Open Items