Re: Unicode support

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: - - <crossroads0000(at)googlemail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unicode support
Date: 2009-04-13 19:28:14
Message-ID: 20090413192814.GH7709@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

- - 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)

alvherre=# select pg_column_size('á');
pg_column_size
----------------
3
(1 fila)

(there's one byte of overhead here, so á is two bytes)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-13 19:31:22 Re: Regression failure on RHEL 4 w/ PostgreSQL 8.4 beta1
Previous Message Kevin Grittner 2009-04-13 19:23:58 Re: proposal: add columns created and altered to pg_proc and pg_class