Re: Locale + encoding combinations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Locale + encoding combinations
Дата
Msg-id 16980.1192029358@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Locale + encoding combinations  (Dave Page <dpage@postgresql.org>)
Ответы Re: Locale + encoding combinations  (Dave Page <dpage@postgresql.org>)
Список pgsql-hackers
Dave Page <dpage@postgresql.org> writes:
> ... There is another issue
> though as I mentioned in the post above - that it complains about an
> invalid encoding specifier on the encoding name, then ignores it and
> uses the default which seems wrong to me.

Yeah, if you look at chklocale() in initdb.c this is clearly how it
works, but there's a comment/* should we exit here? */
so whoever wrote it wasn't all that convinced it was the right behavior.

Given that 8.3 is raising the stakes for having a correct locale
specification at initdb time, it seems right to me to error out if a
bogus locale switch is given, rather than whining and then substituting
the environment default.  Any objections?

That still leaves us with the problem of how to tell whether a locale
spec is bad on Windows.  Judging by your example, Windows checks whether
the code page is present but not whether it is sane for the base locale.
What happens when there's a mismatch --- eg, what encoding do system
messages come out in?
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Timezone database changes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Skytools committed without hackers discussion/review