ILIKE fails with accented letters on utf8 locale - Mailing list pgsql-bugs

From Daniele Varrazzo
Subject ILIKE fails with accented letters on utf8 locale
Date
Msg-id 48144.84.221.75.76.1177370825.squirrel@www.develer.com
Whole thread Raw
List 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:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Next
From: Tom Lane
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect