Re: case insensitive regex clause with some latin1 characters fails - Mailing list pgsql-sql

From Tom Lane
Subject Re: case insensitive regex clause with some latin1 characters fails
Date
Msg-id 5785.1158003676@sss.pgh.pa.us
Whole thread Raw
In response to case insensitive regex clause with some latin1 characters fails  ("Ragnar Österlund" <ragoster@gmail.com>)
Responses Re: case insensitive regex clause with some latin1 characters  (Emi Lu <emilu@encs.concordia.ca>)
List pgsql-sql
"Ragnar Österlund" <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


pgsql-sql by date:

Previous
From: "Ragnar Österlund"
Date:
Subject: case insensitive regex clause with some latin1 characters fails
Next
From: Emi Lu
Date:
Subject: Re: case insensitive regex clause with some latin1 characters