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

Поиск
Список
Период
Сортировка
От MauMau
Тема Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII
Дата
Msg-id 75B586D4B6684564BA4D69BC938FAE3E@maumau
обсуждение исходный текст
Ответ на Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
From: "Greg Stark" <stark@mit.edu>
> Wait, why does the ctype of the database affect the ctype of the
> messages? Shouldn't these be two separate things? One describes the
> character set being used to store data in the database and the other
> the character set the log file and clients are in.


At session start, PostgreSQL sets the ctype of the database to be the 
process's LC_CTYPE locale category in src/backend/utils/init/postinit.c:
ctype = NameStr(dbform->datctype);
...if (pg_perm_setlocale(LC_CTYPE, ctype) == NULL)

The LC_CTYPE locale category determines the character encoding for messages 
obtained by gettext().  This is gettext()'s specification.


Regards
MauMau




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

Предыдущее
От: "MauMau"
Дата:
Сообщение: Re: [bug fix] strerror() returns ??? in a UTF-8/C database withLC_MESSAGES=non-ASCII
Следующее
От: Robert Haas
Дата:
Сообщение: Re: strange IS NULL behaviour