UTF8, LATIN1 conversion problems - Mailing list pgsql-general

From Paulo Angelo
Subject UTF8, LATIN1 conversion problems
Date
Msg-id 61c1709d0904071453t7e81ed7l68c3edf1676b9e18@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi All,

   I'm getting some problems with UTF8 and Pgsql for some days. In the 8.3 version these problems became worse.

In the new version,

=> select convert(f0601_desc, 'UTF8', 'LATIN1') from f0601;
gives: ERROR:  ... convert(character varying, unknown, unknown) don't exists

and

=> select convert(f0601_desc::bytea, 'UTF8', 'LATIN1'),f0601_desc from f0601;
gives:

      convert      |   f0601_desc
-------------------+----------------
 \343 | ã
(1 registro)

And I dont know what to do with a "\343".

I really wanna do something like:

=> select f0601_desc from f0601 where  to_ascii(convert(f0601_desc::bytea, 'UTF8', 'LATIN1')::text,'LATIN1') like 'a';
gives:  (0 registro)


What should I do? I'm thinking create a DB with LATIN1 encoding, but  UTF8 is better (should be :)  ).

Thanx for help.

[]'s

Paulo Angelo

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: nooby Q: temp tables good for web apps?
Next
From: Tom Lane
Date:
Subject: Re: nooby Q: temp tables good for web apps?