Re: [BUGS] BUG #4186: set lc_messages does not work - Mailing list pgsql-hackers

From Hiroshi Saito
Subject Re: [BUGS] BUG #4186: set lc_messages does not work
Date
Msg-id 4601B834946C43C585DD02FB95AFB59A@HIRO57887DE653
Whole thread Raw
In response to Re: [BUGS] BUG #4186: set lc_messages does not work  (Hiroshi Inoue <inoue@tpf.co.jp>)
List pgsql-hackers
Hi.

Sorry very late reaction....

I report the test checked again. 
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/LC_MESSAGES_01.png
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/LC_MESSAGES_02.png
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/LC_MESSAGES_03.png
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/LC_MESSAGES_04.png
and
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/LC_MESSAGES.sql
Then, set PGCLIENTENCODING=SJIS
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/LC_MESSAGES.log

However, libintl needs to be created correctly.(Inoue-san prepares this.)
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/bin/
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/include/
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/lib/

in CVS-HEAD of the newest patch, line positions differ for a while.(.Inoue-san prepares this.)
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/mbutils_2.patch
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/win_lc_messages_2.patch

Conclusion, looks at a good result.!!

Regards,
Hiroshi Saito

----- Original Message ----- 
From: "Hiroshi Inoue" <inoue@tpf.co.jp>


> Oops, I forgot to attach the patch, sorry.
> 
> Hiroshi Inoue wrote:
>> Hi,
>> 
>> I posted a patch 18 days ago but have got no responce.
>> Anyway I've simplified the patch by using an appropriate
>>  gettext module.
>> 
>> Hiroshi Inoue wrote:
>>> Bruce Momjian wrote:
>>>> Tom Lane wrote:
>>>>> Magnus Hagander <magnus@hagander.net> writes:
>>>>>> Thomas H. wrote:
>>>>>>> so at least that explains the "changed" behaviour. nevertheless, 
>>>>>>> LC_MESSAGES seems to be defunct - with the "locale" folder present,
>>>>>>> pg always picks the os' language and ignores the lc_message value.
>>>>>> This looks like I can reproduce though, at least on cvs head. Did this
>>>>>> work for you in previous versions?
>>>>> Maybe we were using a different build of gettext in the previous
>>>>> releases, one that didn't look at the same info as the current code?
>>>>>
>>>>
>>>> Where are we on this?
>> 
>> AFAICS there are 2 causes.
>> 
>> 1. MSVC version of postgres is using a bad gettext module.
>> 2. getenv() in mingw cannot see the result of putenv() in MSVC8.0.
>> 
>> As for 1, we have to use another gettext module. I can provide it
>> if requested.
>> As for 2, pg_putenv() or pg_unsetenv() in the attachced patch calls 
>> corresponding putenv() whose result can be referenced by getenv() in
>>  mingw.
>> 
>> In addtion the patch provides a functionality to Windows locale
>> name to ISO formatted locale name.
>> 
>> Comments ?
>> 
>> regards,
>> Hiroshi Inoue
>


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: incoherent view of serializable transactions
Next
From: "Robert Haas"
Date:
Subject: Re: Warning about the 8.4 release