469,090 Members | 1,096 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

problems with lower() and unicode-databases


postgres 7.4 on linux, glibc 2.2.4-6

I've a table containing unicode-data and the lower()-function does not
work proper. While it lowers standard letters like A->a,B->b ... it
fails on special letters like german umlauts ( , ...) that are simply
keeped untouched.

Everything else (sorting etc.) is working fine and LC_COLLATE, LC_CTYPE
and all the other locales were set proper to 'de_AT.UTF-8' (thats how my
mandrake-systems calls the needed locale. On most other systems its
called 'de_AT.utf8') when doing initdb.

The database-encoding is unicode, but I also tried SQL_ASCII (just to
give it a try) and the same problem.

Whats the problem here?

The following output is copied from a unicode-terminal and copied to the
newsreader. It looks fine here, so I think you can all read it.

# select oid,t,lower(t),length(t) from test order by t;
oid | t | lower | length
-------+-------+-------+--------
17257 | a | a | 1
17268 | A | a | 1
17291 | | | 1
17265 | | | 1
17269 | B | b | 1
17275 | | | 1
17277 | | | 1
17262 | | | 1
17266 | | | 1
17267 | | | 1
# /usr/local/pgsql/bin/pg_controldata /data/postgresql_de/ | grep LC
LC_COLLATE: de_AT.UTF-8
LC_CTYPE: de_AT.UTF-8

I would be very happy to get a "solution", but a workaround would be
better than nothing ;) perl on the same system can read the data from
the database and lowercase the data without any problems, but this is
too much of a *WORK* *AROUND* :)

thnx a lot,
peter

ps: of course upper does not work as well !!
pps: I looked up the changes on newer postgresql-version, but my topic
did not apperar in the list, so I didnt try new 7.4.5. I think its
merely a problem with setting than with postgreSQL. (at least I hope so ...)
--
mag. peter pilsl
goldfisch.at
IT-management
tel +43 699 1 3574035
fax +43 699 4 3574035
pi***@goldfisch.at

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
1 1878
peter pilsl <pi***@goldfisch.at> writes:
postgres 7.4 on linux, glibc 2.2.4-6 I've a table containing unicode-data and the lower()-function does not
work proper. While it lowers standard letters like A->a,B->b ... it
fails on special letters like german umlauts ( , ...) that are simply
keeped untouched.


upper() and lower() didn't support multibyte character sets before 8.0.

regards, tom lane

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

Nov 23 '05 #2

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
19 posts views Thread by Gerson Kurz | last post: by
2 posts views Thread by bobnotbob | last post: by
reply views Thread by Holger Klawitter | last post: by
18 posts views Thread by james | last post: by
2 posts views Thread by Ara Anjargolian | last post: by
4 posts views Thread by pginfo | last post: by
2 posts views Thread by Michael B. Trausch | last post: by
4 posts views Thread by Alexey Moskvin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.