Re: Strange UTF-8 behaviour - Mailing list pgsql-general

From Dennis Gearon
Subject Re: Strange UTF-8 behaviour
Date
Msg-id 4149C0AE.2030101@fireserve.net
Whole thread Raw
In response to Strange UTF-8 behaviour  ("Marco Ferretti" <marco.ferretti@jrc.it>)
List pgsql-general
My guess is that something in the chain of getting the data into the
database is measuring:

    BYTES
not
    CHARACTERS.

"Marco Ferretti" <marco.ferretti@jrc.it> wrote:
</quote--------------------------------------->
<snip>
I have created a database with the UTF-8 encoding  (createdb cassa
--encoding=UTF-8) .
Then I have made the following tests :

cassa=> create table test(id varchar(5));
cassa=> insert into test values ('12345');
INSERT 178725 1
cassa=> insert into test values ('123è');
INSERT 178726 1
cassa=> insert into test values ('1234è');
ERROR:  value too long for type character varying(5)
<snip>
so, apparently the chars are stored the rigth way ( #123è#) but when
trying the query the è char is parsed as  2 chars ....

The database server version is 7.3.4 on a RedHat 9 machine ...

Any clue ?
</quote--------------------------------------->

pgsql-general by date:

Previous
From: ruben
Date:
Subject: Re: Postgres memory usage
Next
From: Jeff
Date:
Subject: Re: Postgres memory usage