BUG #7664: Program using libpq and ecpglib can not output native language

Поиск
Список
Период
Сортировка
От chenhj@cn.fujitsu.com
Тема BUG #7664: Program using libpq and ecpglib can not output native language
Дата
Msg-id E1TZCv4-0002iN-H0@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #7664: Program using libpq and ecpglib can not output native language  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7664
Logged by:          Chen Huajun
Email address:      chenhj@cn.fujitsu.com
PostgreSQL version: 9.1.6
Operating system:   Linux
Description:        =


The error messages output by libpq or ecpglib is always be english. But my
expect is my native language.

Step:
1)compile my program which linked to libpq or ecpglib.
2)set my locale to native language.
set LANG=3Dja_JP.UTF-8
set LC_ALL=3Dja_JP.UTF-8
3)run my program and let it raise an error.

I knows reason. The default locale of a program is "C" in Linux,regardless
the Environment Variables.
if add the following line in my program,everything is OK.

setlocale(LC_ALL, "");

But I found no document tell users should do so.And I think it's not a easy
way.Can libpq and ecpglib do it for users?

*=EF=BC=89Windows is OK.Solaris may has the same problem.

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: BUG #7651: Superfluous calls to functions used for indexing
Следующее
От: Stuart Bishop
Дата:
Сообщение: Re: BUG #7651: Superfluous calls to functions used for indexing