Regular expressions and accentuated letters

From: sergio(dot)cinos(at)info3(dot)com
To: pgsql-admin(at)postgresql(dot)org
Subject: Regular expressions and accentuated letters
Date: 2006-11-20 10:37:43
Message-ID: 8310622684.20061120113743@info3.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dear list members,

I'm using PostgreSQL 8.0.8, witha UTF8 database.
I'm using a regular expression to check if some value is in a string:
field ~* 'somevalue'
It works ok for 'somevalue', 'SoMeVaLuE somedata'...

But if I check
field ~* 'á'
It works for 'áeiou', but fails for 'Áeiou'. Seems that
case-insensitive regular expressions don't know that 'Á' is 'á'
uppercased. Same for 'ñ' and 'Ñ'.

To test, if I select upper('áeiou'), it returns 'ÁEIOU',
that is ok. So the 'disconnection' between 'á' and 'Á' just occurs
in regular expressions, not in other case-insensitive functions.

Is there any solution to avoid this?

Thanks.
--
Sergio Cinos
Info3 Servicios Informáticos S.L.
sergio(dot)cinos(at)info3(dot)com - www.info3.com

Browse pgsql-admin by date

  From Date Subject
Next Message jose fuenmayor 2006-11-20 13:21:20 Settings for writing!
Previous Message lijianghua 2006-11-20 01:09:26 unsubscribe pgsql-admin