On Sat, Dec 18, 2010 at 20:29, David E. Wheeler <da...@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) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers