Jonas Forsman wrote:
The following bug has been logged online:

Bug reference:      3737
Logged by:          Jonas Forsman
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.1.10
Operating system:   Ubuntu 6.06 LTS
Description:        lower/upper fails to match extended chars in  LATIN1
Details:
Try:
select * from table where lower(address) like '%Ã¥%'

This select fails to find addresses including capital Ã… and similars in
LATIN1 (like Å, Ä, Ö).

The behavior of lower() depends on your locale. What locale are you running in? Make sure your locale matches the encoding.

Exact locale names and behavior are defined by the operating system, but for example on Debian, which is probably the same as Ubuntu in this case, use

initdb -D data --locale=sv_SE.iso88591 --encoding=LATIN1

for Swedish.

Also make sure that your client_encoding is set correctly. For example, if you run the query in psql in a terminal that uses UTF-8 encoding, you need to "SET client_encoding='UTF-8'"

See the manual for more details: http://www.postgresql.org/docs/8.1/static/charset.html#LOCALE

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to