Re: plperlu problem with utf8

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: plperlu problem with utf8
Дата
Msg-id AANLkTi=EPzHCxdfM_nSx8s0Vcdw7dcwf7dZnxFRG1dzt@mail.gmail.com
обсуждение исходный текст
Ответ на Re: plperlu problem with utf8  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
On Sat, Dec 18, 2010 at 20:29, David E. Wheeler <david@kineticode.com> wrote:
> On Dec 17, 2010, at 9:32 PM, David Christensen wrote:
>    latin=# SELECT * FROM perlgets('“hello”');
>     length │ is_utf8
>    ────────┼─────────
>         11 │ f
>
> (Yes I used Latin-1 curly quotes in that last example).

Erm, latin1 does not have curly quotes, Windows-1252 does.  Those are
utf8 quotes AFAICT so 11 is actually right (thats 3 bytes per quote so
that  where 11 comes from).   If latin1 did have quotes and you used
them you would have gotten the same answer as latin1 is a single byte
encoding. :) I think your terminal tripping you up here.

Postgres also gives the same length:
latin1=# select length('“hello”');length
--------    11
(1 row)


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

Предыдущее
От: flyusa2010 fly
Дата:
Сообщение: Can postgres create a file with physically continuous blocks.
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: can shared cache be swapped to disk?