Re: NLS on MSVC strikes back!

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Gevik Babakhani <pgdev(at)xs4all(dot)nl>, 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 'Andrew Dunstan' <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, bruce(at)momjian(dot)us
Subject: Re: NLS on MSVC strikes back!
Date: 2008-02-12 17:28:58
Message-ID: 47B1D75A.4020103@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Gevik Babakhani wrote:
>
>> 4. Locale names are different in MS Windows. I created a C app to test
>> gettext on Windows.
>> setting LC_MESSAGES to Spanisg_Spain and German_Germany works but es_ES and
>> de_DE do not :(
>>
>> SET LC_MESSAGES to '....' has no effect because:
>>
>> A. gettext compiled/linked in MSVC looks for the locale of the current
>> thread and NOT the LC_MESSAGES,LANGIAGE,LANG... environment variables. See
>> gettext's sources....
>>
>> B. Given current thread's locale Spanish_Spain, gettext fails to find a
>> directory called "Spanish_Spain" in share/locale. As result English names
>> are returned.
>
> What this really means is that locale support is completely broken in
> the MSVC build, i.e. you cannot get localized strings at all (not just
> to_char()). Is this correct? If so, this is a serious problem.

I've certainly managed to get output in Swedish more than once...
Annoying as hell because it's the default if you build with NLS and has
your English language Windows configured with Swedish time/date format :)

//Magnus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-02-12 17:36:03 Re: Patch review
Previous Message Bruce Momjian 2008-02-12 17:23:43 Re: Patch review