Re: Bug in UTF8-Validation Code?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug in UTF8-Validation Code?
Дата
Msg-id 29864.1175553431@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug in UTF8-Validation Code?  (Mark Dilger <pgsql@markdilger.com>)
Ответы Re: Bug in UTF8-Validation Code?  (Mark Dilger <pgsql@markdilger.com>)
Список pgsql-hackers
Mark Dilger <pgsql@markdilger.com> writes:
>> pgsql=# select chr(14989485);
>> chr
>> -----
>> 中
>> (1 row)

Is there a principled rationale for this particular behavior as
opposed to any other?

In particular, in UTF8 land I'd have expected the argument of chr()
to be interpreted as a Unicode code point, not as actual UTF8 bytes
with a randomly-chosen endianness.

Not sure what to do in other multibyte encodings.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] pg_standby
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: timestamp subtraction (was Re: [SQL] formatting intervals with to_char)