By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 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..... ;-)


--
Best,

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

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.