Search Postgresql Archives

Re: Encoding problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux