From: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
---|---|
To: | Jonas Forsman <jonas(at)axier(dot)org> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3737: lower/upper fails to match extended chars in LATIN1 |
Date: | 2007-11-09 16:45:24 |
Message-ID: | 47348EA4.3050201@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Jonas Forsman wrote:
> The following bug has been logged online:
>
> Bug reference: 3737
> Logged by: Jonas Forsman
> Email address: jonas(at)axier(dot)org
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Douglas Toltzman | 2007-11-09 16:53:57 | Re: BUG #3736: server cannot listen |
Previous Message | Chris Vickery | 2007-11-09 16:40:59 | BUG #3738: psql crashes on exit. |