Home > Archive > PostgreSQL Administration > November 2006 > Regular expressions and accentuated letters









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Regular expressions and accentuated letters
sergio.cinos@info3.com

2006-11-20, 5:26 am

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.cinos@info3.com - www.info3.com


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com