Обсуждение: Bug #654: lower and to_ascii don't work with UTF8

Поиск
Список
Период
Сортировка

Bug #654: lower and to_ascii don't work with UTF8

От
pgsql-bugs@postgresql.org
Дата:
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.

Sample Code


No file was uploaded with this report

Re: Bug #654: lower and to_ascii don't work with UTF8

От
Tatsuo Ishii
Дата:
> 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