Re: Encoding problem

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Arnaud Lesauvage *EXTERN*" <thewild(at)freesurf(dot)fr>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Encoding problem
Date: 2006-10-23 13:43:15
Message-ID: 52EF20B2E3209443BC37736D00C3C1380B0FA562@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I am trying to remove accents from a string. I found a nice
> solution for this on postgresqlfr, using the to_ascii()
> function.
>
> Now, the problem I have is :
>
> mydb=# SELECT to_ascii(convert('abcdef', 'LATIN9'));
> ERROR: encoding conversion from UTF8 to ASCII not supported
>
> Why is the conversion to LATIN9 not working as expected ?
> My database's encoding is UTF8.

Maybe you actually want to

test=> select to_ascii(convert('ábcdêf', 'LATIN9'), 'LATIN9');
to_ascii
----------
abcdef
(1 row)

Yours,
Laurenz Albe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud Lesauvage 2006-10-23 13:49:21 Re: Encoding problem
Previous Message Leonel Nunez 2006-10-23 13:40:04 postgresql-python-3.8.1-3PGDG.i686.rpm