Re: Encoding and i18n

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Encoding and i18n
Дата
Msg-id 87lkagtcht.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Encoding and i18n  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Encoding and i18n  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
"Alvaro Herrera" <alvherre@commandprompt.com> writes:

> Gregory Stark wrote:
>
>> So does the _() macro automatically recode it to the current server encoding?
>
> Well, I'm not sure if it's _(), elog() or what, but it does get recoded.
> If I have a different client_encoding and get a NOTICE, then both the
> server and client get a message in the corresponding encoding.

Actually I was thinking about things like formatting.c which take localized
strings and return them as data which can end up in the database. If they're
in the wrong encoding then they'll be invalidly encoded strings in the
database.

> In fact this is the reason for the most common "PANIC: stack overflow"
> in elog.c error stack.  When a message needs to be recoded but the
> recoding procedure errors out, it wants to report that and this one also
> fails, you get infinite recursion and nothing can get reported.

Ouch


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Encoding and i18n
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Encoding and i18n