Re: Locale + encoding combinations - Mailing list pgsql-hackers

From Dave Page
Subject Re: Locale + encoding combinations
Date
Msg-id 470C8929.3030803@postgresql.org
Whole thread Raw
In response to Re: Locale + encoding combinations  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Locale + encoding combinations
List pgsql-hackers
Peter Eisentraut wrote:
> Dave Page wrote:
>> setlocale(LC_CTYPE, "English_United Kingdom.65001")
>>
>> will return null (and not change anything) because it doesn't like
>> the combination of the locale and that encoding (UTF-8).
> 
> The reason that that call fails is probably that the operating system 
> does not provide such a locale.  

It doesn't - UTF-8/65001 is a pseudo codepage on Windows with no NLS
file defining collation rules etc. as we already discussed.

> But that's not what we are interested 
> in.  We are interested in compatibility between *existing* operating 
> system locales and *PostgreSQL* encoding names.

Yes.

Let me put my question another way.

Latin1 is a perfectly valid encoding for my locale English_United
Kingdom. It is accepted by setlocale for LC_ALL.

Why does initdb reject it? Why does it insist the encoding is not valid
for the locale?

/D



pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Skytools committed without hackers discussion/review
Next
From: Simon Riggs
Date:
Subject: Re: Skytools committed without hackers discussion/review