Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 6ECFC9F9424 for ; Mon, 20 Nov 2006 06:37:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 17370-06 for ; Mon, 20 Nov 2006 10:37:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A26809F9EB3 for ; Mon, 20 Nov 2006 06:37:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.info3.com (smtp.info3.com [213.60.34.74]) by svr4.postgresql.org (Postfix) with ESMTP id 0937C5AF8B4 for ; Mon, 20 Nov 2006 10:37:41 +0000 (GMT) Received: by mail.info3.com (Postfix, from userid 102) id 967851300A1; Mon, 20 Nov 2006 12:37:41 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.info3.com Received: from pcsergio.info3.net (unknown [192.168.0.24]) by mail.info3.com (Postfix) with ESMTP id 8BB8013007D for ; Mon, 20 Nov 2006 12:37:39 +0100 (CET) Date: Mon, 20 Nov 2006 11:37:43 +0100 From: sergio.cinos@info3.com X-Mailer: The Bat! (v3.80.06) Professional Reply-To: sergio.cinos@info3.com Organization: =?utf-8?Q?Info3_Servicios_Inform=C3=A1ticos?= X-Priority: 3 (Normal) Message-ID: <8310622684.20061120113743@info3.com> To: pgsql-admin@postgresql.org Subject: Regular expressions and accentuated letters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/184 X-Sequence-Number: 23711 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 ~* '=C3=A1' It works for '=C3=A1eiou', but fails for '=C3=81eiou'. Seems that case-insensitive regular expressions don't know that '=C3=81' is '=C3=A1' uppercased. Same for '=C3=B1' and '=C3=91'. To test, if I select upper('=C3=A1eiou'), it returns '=C3=81EIOU', that is ok. So the 'disconnection' between '=C3=A1' and '=C3=81' just occurs in regular expressions, not in other case-insensitive functions. Is there any solution to avoid this? Thanks. --=20 Sergio Cinos Info3 Servicios Inform=C3=A1ticos S.L. sergio.cinos@info3.com - www.info3.com=20