Re: Unicode support

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Unicode support
Дата
Msg-id 49E34E3D.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на Re: Unicode support  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> wrote: 
>> 1) Functions like char_length() or length() do NOT return the
number
>> of characters (the manual says they do), instead they return the
>> number of code points.
> 
> I think you have client_encoding misconfigured.
> 
> alvherre=# select length('á'::text);
>  length 
> --------
>       1
> (1 fila)
The OP didn't say it returned the number of bytes.  Since you found
that this character was stored in only two bytes, it must have been
one two-byte code point.  I think storing it as two code points would
have taken at least three bytes (one for the letter and two for the
accent), no?
-Kevin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Regression failure on RHEL 4 w/ PostgreSQL 8.4 beta1
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Unicode support