Why does this use of accents in psql fail for a Unicode database? - Mailing list pgsql-general

From Frank van Vugt
Subject Why does this use of accents in psql fail for a Unicode database?
Date
Msg-id 200401092250.01949.ftm.van.vugt@foxi.nl
Whole thread Raw
List pgsql-general
Hi,

I noticed that queries from one of my php-clients were failing when they
contained certain accented characters, but upon trying the same thing in
psql, it showed failure there as well. Strangely enough, at least one
character is working o.k.

Could someone enlighten my why....?

(using SuSE v9.0)

db=# select version();
                                version
------------------------------------------------------------------------
 PostgreSQL 7.4.1 on i586-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3
(1 row)

db=# \l
          List of databases
     Name      |  Owner   | Encoding
---------------+----------+----------
db  | vugtf    | UNICODE
<cut>
(6 rows)

This database was created using '--no-locale' as initdb-parameter
The postgres.conf contains

db=# \encoding
UNICODE

db=#create table f_test(value text);
CREATE TABLE

megafox=# insert into f_test values ('€');
INSERT 2518547 1

db=# insert into f_test values ('ç');
db'#
<ctrl>+<c>

db=# insert into f_test values ('õ');
db'#
<ctrl>+<c>

db=# insert into f_test values ('é');
db'#
<ctrl>+<c>

megafox=# insert into f_test values ('één');
ERROR:  invalid byte sequence for encoding "UNICODE": 0xe9e96e


=> the insert that succeeds is that of a Euro-sign

=> all accented characters including the Euro are created using a compose key

=> I guess in the last insert, the two hidden '-characters work as a pair...


Any hints on what's causing this behaviour are welcomed..... ;-)




--
Best,





Frank.


pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: no space left on device
Next
From: Karsten Hilbert
Date:
Subject: Re: no space left on device