Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> On 1/12/2009 7:36 PM, DM wrote:
>> select convert('Vall\xe9e','LATIN1','UTF8');
> You expect the result 'Valle', right? As in the utf-8 bytes
> Vall\xc3\xa9e
> ?
The whole thing seems like an exercise in unnecessary pain anyway.
Why not just set client_encoding to LATIN1 and send your strings
as-is, letting the server deal with the encoding conversion
automatically?
regards, tom lane