Re: Bug #654: lower and to_ascii don't work with UTF8 - Mailing list pgsql-bugs

From Tatsuo Ishii
Subject Re: Bug #654: lower and to_ascii don't work with UTF8
Date
Msg-id 20020502190140C.t-ishii@sra.co.jp
Whole thread Raw
In response to Bug #654: lower and to_ascii don't work with UTF8  (pgsql-bugs@postgresql.org)
List pgsql-bugs
> Peter Vicen (vicen@pv2c.sk) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> lower and to_ascii don't work with UTF8
>
> Long Description
> String functions (to_ascii and lower tested) don't work with UTF8.

Regarding to_ascii:

"The to_ascii function supports conversion from LATIN1, LATIN2,
WIN1250 (CP1250) only." So it's clearly not a bug:-)

For lower, I guess it is because your OS does not support UTF-8
locale. So it's not PostgreSQL's fault. Possible workaround might be:

lower(convert('your_utf8_string', 'LATIN1'))

Of course this would only work if you use only LATIN1 characters in
UTF-8.
--
Tatsuo Ishii

pgsql-bugs by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Bug #653: Unable to insert binary data into BYTEA
Next
From: "Nigel J. Andrews"
Date:
Subject: createdb comments