Re: invalidly encoded strings

Поиск
Список
Период
Сортировка
Искать
От
Tatsuo Ishii
Тема
Re: invalidly encoded strings
Дата
Msg-id
20070912.124356.41631070.t-ishii@sraoss.co.jp
Ответ на
Список
Дерево обсуждения
Re: invalidly encoded strings "Albe Laurenz" <laurenz.albe@wien.gv.at>
> However ISTM we would also need something like
> 
> length(bytea, name) returns int
> 	-- counts the number of characters assuming that the bytea is in
> 	-- the given encoding
> 
> Hmm, I wonder if counting chars is consistent regardless of the
> encoding the string is in.  To me it sounds like it should, in which
> case it works to convert to the DB encoding and count chars there.

Not necessarily.

It's possible that after encoding conversion, number of chars are
different before and after. An example is, UTF-8 and EUC_JIS_2004.

0xa4f7(EUC_JIS_2004) <--> U+304B *and* U+309A (Unicode)

This is defined in the Japanese goverment's standard.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

В списке pgsql-hackers по дате отправления
От: Brendan Jurd
Дата:
От: Tom Lane
Дата:
Сообщение: Re: CVS HEAD is broken by flex
FAQ