Re: case insensitive regex clause with some latin1 characters fails

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ragnar Österlund <ragoster(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: case insensitive regex clause with some latin1 characters fails
Date: 2006-09-11 19:41:16
Message-ID: 5785.1158003676@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" <ragoster(at)gmail(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Emi Lu 2006-09-11 20:14:04 Re: case insensitive regex clause with some latin1 characters
Previous Message Ragnar Österlund 2006-09-11 19:09:14 case insensitive regex clause with some latin1 characters fails