Re: BUG #5221: errors converting string to utf8

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5221: errors converting string to utf8
Дата
Msg-id 1313.1259681412@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #5221: errors converting string to utf8  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-bugs
Craig Ringer <craig@postnewspapers.com.au> writes:
> On 1/12/2009 7:36 PM, DM wrote:
>> select convert('Vall\xe9e','LATIN1','UTF8');

> You expect the result 'Vallée', right? As in the utf-8 bytes
>    Vall\xc3\xa9e
> ?

The whole thing seems like an exercise in unnecessary pain anyway.
Why not just set client_encoding to LATIN1 and send your strings
as-is, letting the server deal with the encoding conversion
automatically?

            regards, tom lane

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: BUG #5221: errors converting string to utf8
Следующее
От: nicolas urtizberea
Дата:
Сообщение: bug