From: | Arnaud Lesauvage <thewild(at)freesurf(dot)fr> |
---|---|
To: | Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Encoding problem |
Date: | 2006-10-23 13:49:21 |
Message-ID: | 453CC861.5020807@freesurf.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Albe Laurenz a écrit :
>> 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)
Indeed !!!
Thanks a lot !
I suppose that not giving the encoding to 'to_ascii'
defaulted to the database encoding ?
Sorry for this mistake, I did not realize that this setting
existed for the to_ascii function...
Thanks again !
--
Arnaud
From | Date | Subject | |
---|---|---|---|
Next Message | Wes Sheldahl | 2006-10-23 13:54:11 | Re: performace review |
Previous Message | Albe Laurenz | 2006-10-23 13:43:15 | Re: Encoding problem |