pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5766: regexp \y doesn't work properly when a word starts on ends with a UTF-8 char
2+ messages / 2 participants
[nested] [flat]

* BUG #5766: regexp \y doesn't work properly when a word starts on ends with a UTF-8 char
@ 2010-11-24 16:43  Grzegorz Daniluk <gdaniluk@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Grzegorz Daniluk @ 2010-11-24 16:43 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5766
Logged by:          Grzegorz Daniluk
Email address:      gdaniluk@gmail.com
PostgreSQL version: 9.0.1
Operating system:   Windows 7 64-bit
Description:        regexp \y doesn't work properly when a word starts on
ends with a UTF-8 char
Details: 

select regexp_replace('Foo Pasaż Bar', E'\\yPasaż\\y', '');

Above query doesn't replace the word 'Pasaż'. It returns full 'Foo Pasaż
Bar' string, when the correct behavior is to return 'Foo  Bar'. 

When the 'ż' is replaced with normal ASCII character like 'z',
regexp_replace works as expected.

My db details:
ENCODING = 'UTF8'
LC_COLLATE = 'Polish_Poland.1250'
LC_CTYPE = 'Polish_Poland.1250'



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #5766: regexp \y doesn't work properly when a word starts on ends with a UTF-8 char
@ 2010-11-24 17:57  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Grzegorz Daniluk <gdaniluk@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2010-11-24 17:57 UTC (permalink / raw)
  To: Grzegorz Daniluk <gdaniluk@gmail.com>; +Cc: pgsql-bugs

"Grzegorz Daniluk" <gdaniluk@gmail.com> writes:
> select regexp_replace('Foo Pasaż Bar', E'\\yPasaż\\y', '');

> Above query doesn't replace the word 'Pasaż'. It returns full 'Foo Pasaż
> Bar' string, when the correct behavior is to return 'Foo  Bar'. 

Is this problem limited to \y, or do other regex operations that depend
on locale-specific character classification also not work for you?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-11-24 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-24 16:43 BUG #5766: regexp \y doesn't work properly when a word starts on ends with a UTF-8 char Grzegorz Daniluk <gdaniluk@gmail.com>
2010-11-24 17:57 ` Tom Lane <tgl@sss.pgh.pa.us>

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