Re: BUG #3737: lower/upper fails to match extended chars in LATIN1

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: BUG #3737: lower/upper fails to match extended chars in LATIN1
Дата
Msg-id 47348EA4.3050201@enterprisedb.com
обсуждение исходный текст
Ответ на BUG #3737: lower/upper fails to match extended chars in LATIN1  ("Jonas Forsman" <jonas@axier.org>)
Ответы Re: BUG #3737: lower/upper fails to match extended chars in LATIN1  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-bugs
Jonas Forsman wrote:
> The following bug has been logged online:
>
> Bug reference:      3737
> Logged by:          Jonas Forsman
> Email address:      jonas@axier.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Chris Vickery"
Дата:
Сообщение: BUG #3738: psql crashes on exit.
Следующее
От: Douglas Toltzman
Дата:
Сообщение: Re: BUG #3736: server cannot listen