Skip site navigation (1) Skip section navigation (2)

ILIKE fails with accented letters on utf8 locale

From: "Daniele Varrazzo" <piro(at)develer(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ILIKE fails with accented letters on utf8 locale
Date: 2007-04-23 23:27:05
Message-ID: 48144.84.221.75.76.1177370825.squirrel@www.develer.com (view raw or flat)
Thread:
Lists: pgsql-bugs
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

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-04-24 02:42:38
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Previous:From: Heikki LinnakangasDate: 2007-04-23 22:15:24
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group