469,267 Members | 1,082 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

bug?!: lower() breaks unicode

Hash: SHA1

Hi there,

I have a database with encoding UNICODE, when I run lower() on a column with
non ascii code the code for "sharp s" gets garbled. This happens with
postgres 7.3.[234] under Linux (Debian woody and SuSE 7.2). I have made sure
that LC_CTYPE=C for the server:

create table t ( a text, b text );
\encoding latin1 // my terminal is latin1
insert into t (a) values( 'Fu▀' );
update t set b = lower(a);
select * from t;

ERROR: Could not convert UTF-8 to ISO8859-1

Apparantly the utf-8 special codes get lowercased, as the following selects
yield different results:

\encoding unicode // show me all
select a from t
select b from t

Fu├ // select a from t
fu // select b from t, should be "fu├"
The JDBC code breaks even more baldy.

java.lang.ArrayIndexOutOfBoundsException: 9
at org.postgresql.core.Encoding.decodeUTF8(Encoding.j ava:254)

- From the release docs of 7.4 it does not seems that this issue has not been
adressed. The database has been initialized to "de_DE@euro", but this
shouldn't matter, should it?

Mit freundlichem Gru▀ / With kind regards
Holger Klawitter
- --
lists <at> klawitter <dot> de
Version: GnuPG v1.2.2 (GNU/Linux)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
0 1216

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Hallvard B Furuseth | last post: by
3 posts views Thread by Phelim | last post: by
7 posts views Thread by John Angel | last post: by
2 posts views Thread by Ara Anjargolian | last post: by
4 posts views Thread by pginfo | last post: by
19 posts views Thread by Eric Lindsay | last post: by
4 posts views Thread by Alexey Moskvin | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.