Re: UTF-8 to ASCII

From: Arnaud Lesauvage <arnaud(dot)lesauvage(at)supermail(dot)fr>
To: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UTF-8 to ASCII
Date: 2007-05-11 12:57:51
Message-ID: 4644684F.2010903@supermail.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 WIN1250 encodings)*

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2007-05-11 13:16:55 Re: UTF-8 to ASCII
Previous Message Martin Marques 2007-05-11 12:46:52 Re: UTF-8 to ASCII