Re: Locale + encoding combinations

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Locale + encoding combinations
Дата
Msg-id 470BF4E7.7050107@postgresql.org
обсуждение исходный текст
Ответ на Re: Locale + encoding combinations  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Locale + encoding combinations  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> Dave Page wrote:
>> Is there any reason not to accept other combinations that setlocale()
>> is happy with?
> 
> setlocale() sets the locale.  How does it "accept" a "combination"?
> 

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).

setlocale(LC_CTYPE, "English_United Kingdom.1252")

will return "English_United Kingdom.1252" and set the locale accordingly
because WIN1252 is a valid encoding for that locale. Similarly, LATIN1
and numerous other encodings are accepted in combination with that locale.

Should initdb allow any combination that setlocale() accepts, or should
it *only* accept the default encoding for the specified locale?

/D


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: some points for FAQ
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: ECPG regression tests