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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #7664: Program using libpq and ecpglib can not output native language
Дата
Msg-id 4803.1353043336@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #7664: Program using libpq and ecpglib can not output native language  (chenhj@cn.fujitsu.com)
Ответы Re: BUG #7664: Program using libpq and ecpglib can not output native language  (Chen Huajun <chenhj@cn.fujitsu.com>)
Список pgsql-bugs
chenhj@cn.fujitsu.com writes:
> 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?

No, it would most certainly be inappropriate for a library to do that.
setlocale could completely break a program that wasn't expecting it.
The effects would be global across the whole process, not confined to
the library.

            regards, tom lane

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

Предыдущее
От: dominique-doisne@idoine-formation.com
Дата:
Сообщение: BUG #7660: Installation problem
Следующее
От: Chen Huajun
Дата:
Сообщение: Re: BUG #7664: Program using libpq and ecpglib can not output native language