Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKrl7-00022Z-E5 for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Mar 2013 14:55:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UKrl6-0007pr-Iz for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Mar 2013 14:55:24 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKnfB-0001FS-0k for pgsql-bugs@postgresql.org; Wed, 27 Mar 2013 10:33:01 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKnf9-0000ph-0A for pgsql-bugs@postgresql.org; Wed, 27 Mar 2013 10:33:00 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKnf8-0007Xo-AN for pgsql-bugs@postgresql.org; Wed, 27 Mar 2013 10:32:58 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UKnf7-0005Sa-L4 for pgsql-bugs@postgresql.org; Wed, 27 Mar 2013 10:32:57 +0000 Date: Wed, 27 Mar 2013 10:32:57 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7999: Regexp with utf8 To: pgsql-bugs@postgresql.org From: somloieater@gmail.com X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 7999 Logged by: david Email address: somloieater@gmail.com PostgreSQL version: 9.1.8 Operating system: linux Description:=20=20=20=20=20=20=20=20 \y and \Y do not behave correctly next to multibyte utf-8 characters - they seem to invert their senses=CB=90 Propper behaivour with ascii e 'es'~$$\y[e=C9=9B]s$$ =3D> t=20 Inverted behaviour with epsilon '=C9=9Bs'~$$\y[e=C9=9B]s$$ =3D> f '=C9=9Bs'~$$[e=C9=9B]\ys$$ =3D> t '=C9=9Bs'~$$[e=C9=9B]\Ys$$ =3D> f This seems to be a case of utf8 characters not being recognised as word-forming: '=C9=9B'~$$\w'$$ =3D> f I've checked with a few other characters which are >1byte in utf8. U+00F0 counds as \w, but nothing I've tried > FF matches. I wonder if it's something to do with >256?=20 In case anyone else hits this bug, replacing \y with (^|$|\s|[[:punct:]]) seems to work for me, although it's ugly. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs