BUG #5039: 'i' flag i in regexp_replace ignored for polish letters

Started by Kamil Romanover 16 years ago4 messagesbugs
Jump to latest
#1Kamil Roman
kamil.lech.roman@gmail.com

The following bug has been logged online:

Bug reference: 5039
Logged by: Kamil Roman
Email address: kamil.lech.roman@gmail.com
PostgreSQL version: 8.3.7
Operating system: Windows XP
Description: 'i' flag i in regexp_replace ignored for polish letters
Details:

select regexp_replace('LUBŻKOĄŚĆĘŁŃÓ','[ośżźćęąłńó]',
'_','ig');

returns 'LUBŻK_ĄŚĆĘŁŃÓ' and it should return LUB_K_______

#2Robert Haas
robertmhaas@gmail.com
In reply to: Kamil Roman (#1)
Re: BUG #5039: 'i' flag i in regexp_replace ignored for polish letters

On Sat, Sep 5, 2009 at 5:42 AM, Kamil Roman <kamil.lech.roman@gmail.com> wrote:

The following bug has been logged online:

Bug reference:      5039
Logged by:          Kamil Roman
Email address:      kamil.lech.roman@gmail.com
PostgreSQL version: 8.3.7
Operating system:   Windows XP
Description:        'i' flag i in regexp_replace ignored for polish letters
Details:

select  regexp_replace('LUBŻKOĄŚĆĘŁŃÓ','[ośżźćęąłńó]',
'_','ig');

returns 'LUBŻK_ĄŚĆĘŁŃÓ' and it should return LUB_K_______

I haven't seen a response to this. Anyone think this might be a bug?

...Robert

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#2)
Re: BUG #5039: 'i' flag i in regexp_replace ignored for polish letters

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, Sep 5, 2009 at 5:42 AM, Kamil Roman <kamil.lech.roman@gmail.com> wrote:

Description:        'i' flag i in regexp_replace ignored for polish letters

I haven't seen a response to this. Anyone think this might be a bug?

If he's using a multibyte character set (UTF8 most likely) there is
pretty much 0 hope of it working. The existing TODO entry for this
links to
http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php

regards, tom lane

#4Kamil Roman
kamil.lech.roman@gmail.com
In reply to: Tom Lane (#3)
Re: BUG #5039: 'i' flag i in regexp_replace ignored for polish letters

Hello,
yes, I have been using UTF-8. Shouldn't this behaviour be at least
documented in the postgresql documentation? I am aware that it is a bug, but
if it is not likely to be fixed soon IMHO it should be documented somehow.

Regards,
Kamil Roman

2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>

Show quoted text

Robert Haas <robertmhaas@gmail.com> writes:

On Sat, Sep 5, 2009 at 5:42 AM, Kamil Roman <kamil.lech.roman@gmail.com>

wrote:

Description: 'i' flag i in regexp_replace ignored for polish

letters

I haven't seen a response to this. Anyone think this might be a bug?

If he's using a multibyte character set (UTF8 most likely) there is
pretty much 0 hope of it working. The existing TODO entry for this
links to
http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php

regards, tom lane