BUG #5220: regexp fails on punctuation characters

Started by jef peeraerover 16 years ago2 messagesbugs
Jump to latest
#1jef peeraer
jef.peeraer@telenet.be

The following bug has been logged online:

Bug reference: 5220
Logged by: jef peeraer
Email address: jef.peeraer@telenet.be
PostgreSQL version: 8.3
Operating system: linux
Description: regexp fails on punctuation characters
Details:

my lc_locale is set to en_US.UTF-8
if i do a search like this

select * from contacten
where naam ~* 'RÖN'
and my contacten table contains a column naam with the value
RÖNTGEN TECHNISCHE DIENST NV
-> it won't find it

the same query with
naam ILIKE '%RÖN%' works perfectly

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: jef peeraer (#1)
Re: BUG #5220: regexp fails on punctuation characters

"jef peeraer" <jef.peeraer@telenet.be> writes:

my lc_locale is set to en_US.UTF-8
if i do a search like this

select * from contacten
where naam ~* 'RÖN'
and my contacten table contains a column naam with the value
RÖNTGEN TECHNISCHE DIENST NV
-> it won't find it

Works for me.

It is true that ~* isn't very good about upper/lower case matching
for non-ASCII letters, but that doesn't seem to apply to your
example.

regards, tom lane