Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name
Date: 2011-04-20 21:40:47
Message-ID: 4DAF52DF.5060906@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

(2011/04/20 15:30), Heikki Linnakangas wrote:
> On 20.04.2011 06:48, Hiroshi Inoue wrote:
>> I can find no concrete reference to problems about locale
>> names containing dots. Is the following an example?
>
> Yes.
>
>> In my environment (Windows Vista using VC8)
>>
>> setlocale(LC_XXXX, "Chinese (Traditional)_MCO.950");
>> works and
>> setlocale(LC_XXXX, NULL);
>> returns
>> Chinese (Traditional)_Macao S.A.R..950
>
> Interesting. According to Microsoft's documentation, the codes are
> three-letter country codes specified by ISO-3166
> (http://msdn.microsoft.com/en-us/library/cdax410z%28v=VS.100%29.aspx)
> However, according to Wikipedia, MCO stands for Monaco, not Macau
> (https://secure.wikimedia.org/wikipedia/en/wiki/ISO_3166-1_alpha-3)

Hmm Windows locale system seems to have an inconsistency and the same
country code (MCO) corresponds to different countries.
ZHM_MCO corresponds to Chinese (Traditional)_Macao S.A.R..950 whereas
FRM_MCO corresponds to French_Principality of Monaco.

regards,
Hiroshi Inoue

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-04-20 21:44:30 pgsql: Make plan_cluster_use_sort cope with no IndexOptInfo for the tar
Previous Message Hiroshi Inoue 2011-04-20 21:39:42 Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-04-20 21:43:11 Re: pgindent weirdness
Previous Message Hiroshi Inoue 2011-04-20 21:39:42 Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name