X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D31209FB21E for ; Mon, 11 Sep 2006 17:14:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 62072-02 for ; Mon, 11 Sep 2006 20:14:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from perseverance.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by postgresql.org (Postfix) with ESMTP id A86179FA617 for ; Mon, 11 Sep 2006 17:14:09 -0300 (ADT) Received: from [132.205.47.225] (emilu@cacao.encs.concordia.ca [132.205.47.225]) by perseverance.encs.concordia.ca (8.13.7/8.13.7) with ESMTP id k8BKE4fQ010308; Mon, 11 Sep 2006 16:14:04 -0400 Message-ID: <4505C38C.9080108@encs.concordia.ca> Date: Mon, 11 Sep 2006 16:14:04 -0400 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Tom Lane CC: =?ISO-8859-1?Q?Ragnar_=D6sterlund?= , pgsql-sql@postgresql.org Subject: Re: case insensitive regex clause with some latin1 characters References: <6b4c32560609111209v7edc95dcq9a559d0f5e69027b@mail.gmail.com> <5785.1158003676@sss.pgh.pa.us> In-Reply-To: <5785.1158003676@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2006/09/11 16:14:04 EDT X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200609/72 X-Sequence-Number: 26283 My environment setup as: show lc_ctype; lc_ctype ------------- fr_CA.UTF-8 (1 row) fis=> SELECT 'Ä' ~* 'ä'; ?column? ---------- f (1 row) fis=> SELECT 'Ä' ilike 'ä'; ?column? ---------- f (1 row) I got the same result: false > "=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" writes: >> I'm not sure if this is a bug or if I'm doing something wrong. I have >> a database encoded with ISO-8859-1, aka LATIN1. When I do something >> like: > >> SELECT 'Ä' ~* 'ä'; > >> it returns false. > > Check the database's locale setting (LC_CTYPE). It has to be one that > expects LATIN1 encoding. > > The current regex code is generally not able to deal with locale-specific > behaviors in UTF8 encoding, but it should work for single-byte encodings > as long as you've got the locale setting right. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings