469,904 Members | 2,533 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Why does this use of accents in psql fail for a Unicode database?


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();
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
(6 rows)

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

db=# \encoding

db=#create table f_test(value text);

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

db=# insert into f_test values ('');

db=# insert into f_test values ('');

db=# insert into f_test values ('');

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 composekey

=> I guess in the last insert, the two hidden '-characters work as a pair....
Any hints on what's causing this behaviour are welcomed..... ;-)


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
0 1130

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by c w | last post: by
15 posts views Thread by Daniel Schuchardt | last post: by
10 posts views Thread by Carlos Ojea Castro | last post: by
2 posts views Thread by Russ Brown | last post: by
5 posts views Thread by Gabriel Marinello | last post: by
9 posts views Thread by albert | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.