pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sergio.cinos@info3.com
To: pgsql-admin@postgresql.org
Subject: Regular expressions and accentuated letters
Date: Mon, 20 Nov 2006 11:37:43 +0100
Message-ID: <8310622684.20061120113743@info3.com> (raw)

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 




Message-ID: <8310622684.20061120113743@info3.com>
Permalink:  ../8310622684.20061120113743@info3.com/
Also on:    postgresql.org/message-id/8310622684.20061120113743@info3.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sergio.cinos@info3.com
  Subject: Re: Regular expressions and accentuated letters
  In-Reply-To: <8310622684.20061120113743@info3.com>
  References: <8310622684.20061120113743@info3.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox