| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера