pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: albert.cieszkowski@cc.com.pl
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6457: Regexp not processing word (with special characters on ends) correctly (UTF-8)
Date: Tue, 14 Feb 2012 13:28:11 -0500
Message-ID: <11041.1329244091@sss.pgh.pa.us> (raw)
In-Reply-To: <E1RxIJH-000504-Ti@wrigleys.postgresql.org>
References: <E1RxIJH-000504-Ti@wrigleys.postgresql.org>

albert.cieszkowski@cc.com.pl writes:
> peimp=> select 'Świnoujście' ~* '\mŚwinoujście\M';
>  ?column?
> ----------
>  f
> (1 row)

Oh, I see the reason for this: the code in cclass() in regc_locale.c
doesn't go further up than U+00FF, so no codes above that will be
thought to be letters (or members of any other character class).
Clearly we need to go further when we are dealing with UTF8.
I'm not sure what a sane limit would be though.

(It would be nice if there were a more efficient way to get this
information than laboriously iterating through all the possible
character codes.  It doesn't look like we're even trying to cache
the results, ick.)

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <11041.1329244091@sss.pgh.pa.us>
Permalink:  ../11041.1329244091@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11041.1329244091@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, albert.cieszkowski@cc.com.pl
  Subject: Re: BUG #6457: Regexp not processing word (with special characters on ends) correctly (UTF-8)
  In-Reply-To: <11041.1329244091@sss.pgh.pa.us>
  References: <E1RxIJH-000504-Ti@wrigleys.postgresql.org> <11041.1329244091@sss.pgh.pa.us>

* 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