Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.
Дата
Msg-id 492B771F.5090008@tpf.co.jp
обсуждение исходный текст
Ответ на Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Hiroshi Inoue <inoue@tpf.co.jp> writes:
>> Tom Lane wrote:
>>> I'm not following this either.  If the patch is really necessary then it
>>> seems it must be working around a bug in the Windows version of gettext,
>>> ie failure to distinguish CP932 from CP20932.  Is that correct?
> 
>> I'm afraid I don't understand what you mean exactly.
>> AFAIK the output encoding of Windows gettext is detemined by the
>> ANSI system code page which is usualy CP932(Shift_JIS) in Japan and
>>  unrelated to the locale settings.
> 
> If that's true then this code is presently broken for *every* locale
> under Windows, not only Japanese.

Maybe there are a few languages/countires where 2 encodings arewidely used.

> To my mind the really correct thing to be doing here would be to call
> bind_textdomain_codeset in all cases, rather than trusting gettext to
> guess correctly about which encoding we want. As the comment notes,
> we have not attempted that because the codeset names aren't well
> standardized.  But it seems to me that we could certainly find out what
> codeset names are used on Windows, and apply bind_textdomain_codeset
> all the time on Windows.  That would make a lot more sense than ad-hoc
> treatment of UTF-8 and EUC-JP if you ask me ...

I fundamentally agree with you.
What we hope is to enable the use of Japanese message catalog which
we gave up in 8.3 Windows-version release.

regards,
Hiroshi Inoue



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.