Re: UTF-8 to ASCII

Поиск
Список
Период
Сортировка
От Arnaud Lesauvage
Тема Re: UTF-8 to ASCII
Дата
Msg-id 4644684F.2010903@supermail.fr
обсуждение исходный текст
Ответ на UTF-8 to ASCII  (Martin Marques <martin@bugs.unl.edu.ar>)
Список pgsql-general
Martin Marques a écrit :
> I have a doubt about the function to_ascii() and what the documentation
> says.
>
> Basically, I passed my DB from latin1 to UTF-8, and I started getting an
> error when using the to_ascii() function on a field of one of my DB [1]:
>
> ERROR:  la conversión de codificación de UTF8 a ASCII no está soportada
>
> OK, it's in spanish, but basically it says that the conversion UTF8 to
> ASCII is not supported, but in the documentation [2] I see this in the
> "Table 9-7. Built-in Conversions":
>
> utf8_to_ascii    UTF8    SQL_ASCII
>
> Is the documentation wrong or something?

Hi Martin,
I think the documentation of 8.1 is wrong.
It looks different indocumentation of 8.2 :
to_ascii : Convert string to ASCII from another encoding *(only supports conversion from LATIN1, LATIN2, LATIN9, and
WIN1250encodings)* 

Hi ran into this problem too, and I wrote a function that converts from DB encoding to LATIN9 before doing the to_ascii
conversion: /to_ascii(convert(mystring, 'LATIN9'), 'LATIN9')/ 

Regards
--
Arnaud

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

Предыдущее
От: Martin Marques
Дата:
Сообщение: Re: UTF-8 to ASCII
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: UTF-8 to ASCII