Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Encoding problem


  • From: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: Encoding problem
  • Date: Mon, 23 Oct 2006 14:41:48 +0200
  • Message-id: <453CB88C(dot)2030106(at)freesurf(dot)fr>

Hi List !

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.


Furthermore, in PgAdmin, running SELECT convert(somestring, 'LATIN9'); returns empty strings whenever somestring contains special (accentued, in my case) characters.
SELECT Length(convert(somestring, 'LATIN9')); looks OK though !

I think my misunderstanding of encoding is driving me crazy...
Could anyone help me on this ?

Thanks !
--
Arnaud



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group