Unix Technical Forum

ILIKE fails with accented letters on utf8 locale

This is a discussion on ILIKE fails with accented letters on utf8 locale within the pgsql Bugs forums, part of the PostgreSQL category; --> Hello, using a database with utf8 encoding and utf8 locale, accented letters are not properly compared. Test to reproduce: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:44 AM
Daniele Varrazzo
 
Posts: n/a
Default ILIKE fails with accented letters on utf8 locale

Hello,

using a database with utf8 encoding and utf8 locale, accented letters are
not properly compared.

Test to reproduce: it converts a lowercase letter (the sequence '\xc3\xa8'
is the utf8 encoding of the unicode 'LATIN SMALL LETTER E WITH GRAVE') into
uppercase and then compares the two letters with a non case sensitive
operator. I expect this to be an identity, so the value expected from the
query is 't'.

$ initdb --encoding=utf8 --locale=en_US.utf8 en_utf8
$ pg_ctl -D en_utf8 start
$ psql postgres
postgres=# SELECT upper('\xc3\xa8') ILIKE '\xc3\xa8';
?column?
----------
f

The locale it_IT.utf8 shows the same problem too. The result is true for
it_IT.iso-8859-1 locale.

Is it a PostgreSQL related problem or a libc one?

Thank you

--
Daniele Varrazzo - Develer S.r.l.
http://www.develer.com

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:43 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com