Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII
Дата
Msg-id 522E418F.5090005@gmx.net
обсуждение исходный текст
Ответ на [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII  ("MauMau" <maumau307@gmail.com>)
Ответы Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII  ("MauMau" <maumau307@gmail.com>)
Список pgsql-hackers
On 9/6/13 9:40 AM, MauMau wrote:
> $ psql -d postgres -c "SELECT * FROM a"
> ... This outputs, in Japanese, a message meaning "could not open file
> "base/xxx/yyy": ???".
> 
> The problem is that strerror() returns "???", which hides the cause of
> the trouble.
> 
> The cause is that gettext() called by strerror() tries to convert UTF-8
> messages obtained from libc.mo to ASCII.  This is because postgres calls
> setlocale(LC_CTYPE, "C") when it connects to the database.

Does anyone know why the PostgreSQL-supplied part of the error message
does not get messed up?



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: New statistics for WAL buffer dirty writes
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII