pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedcase insensitive regex clause with some latin1 characters fails
3+ messages / 3 participants
[nested] [flat]
* case insensitive regex clause with some latin1 characters fails
@ 2006-09-11 19:09 Ragnar Österlund <ragoster@gmail.com>
2006-09-11 19:41 ` Re: case insensitive regex clause with some latin1 characters fails Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Ragnar Österlund @ 2006-09-11 19:09 UTC (permalink / raw)
To: pgsql-sql
Hi,
I'm not sure if this is a bug or if I'm doing something wrong. I have
a database encoded with ISO-8859-1, aka LATIN1. When I do something
like:
SELECT 'Ä' ~* 'ä';
it returns false. If i do:
SELECT 'A' ~* 'a';
I get true. According to specification, both should return true.
Anyone knows what the problem might be?
/Ragnar
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: case insensitive regex clause with some latin1 characters fails
2006-09-11 19:09 case insensitive regex clause with some latin1 characters fails Ragnar Österlund <ragoster@gmail.com>
@ 2006-09-11 19:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-09-11 20:14 ` Re: case insensitive regex clause with some latin1 characters Emi Lu <emilu@encs.concordia.ca>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2006-09-11 19:41 UTC (permalink / raw)
To: Ragnar Österlund <ragoster@gmail.com>; +Cc: pgsql-sql
"=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" <ragoster@gmail.com> writes:
> I'm not sure if this is a bug or if I'm doing something wrong. I have
> a database encoded with ISO-8859-1, aka LATIN1. When I do something
> like:
> SELECT 'Ä' ~* 'ä';
> it returns false.
Check the database's locale setting (LC_CTYPE). It has to be one that
expects LATIN1 encoding.
The current regex code is generally not able to deal with locale-specific
behaviors in UTF8 encoding, but it should work for single-byte encodings
as long as you've got the locale setting right.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: case insensitive regex clause with some latin1 characters
2006-09-11 19:09 case insensitive regex clause with some latin1 characters fails Ragnar Österlund <ragoster@gmail.com>
2006-09-11 19:41 ` Re: case insensitive regex clause with some latin1 characters fails Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-09-11 20:14 ` Emi Lu <emilu@encs.concordia.ca>
0 siblings, 0 replies; 3+ messages in thread
From: Emi Lu @ 2006-09-11 20:14 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ragnar Österlund <ragoster@gmail.com>; pgsql-sql
My environment setup as:
show lc_ctype;
lc_ctype
-------------
fr_CA.UTF-8
(1 row)
fis=> SELECT 'Ä' ~* 'ä';
?column?
----------
f
(1 row)
fis=> SELECT 'Ä' ilike 'ä';
?column?
----------
f
(1 row)
I got the same result: false
> "=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" <ragoster@gmail.com> writes:
>> I'm not sure if this is a bug or if I'm doing something wrong. I have
>> a database encoded with ISO-8859-1, aka LATIN1. When I do something
>> like:
>
>> SELECT 'Ä' ~* 'ä';
>
>> it returns false.
>
> Check the database's locale setting (LC_CTYPE). It has to be one that
> expects LATIN1 encoding.
>
> The current regex code is generally not able to deal with locale-specific
> behaviors in UTF8 encoding, but it should work for single-byte encodings
> as long as you've got the locale setting right.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-09-11 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11 19:09 case insensitive regex clause with some latin1 characters fails Ragnar Österlund <ragoster@gmail.com>
2006-09-11 19:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-09-11 20:14 ` Re: case insensitive regex clause with some latin1 characters Emi Lu <emilu@encs.concordia.ca>
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