Re: BUG #5221: errors converting string to utf8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5221: errors converting string to utf8
Date: 2009-12-01 15:30:12
Message-ID: 1313.1259681412@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message nicolas urtizberea 2009-12-01 18:16:47 bug
Previous Message Craig Ringer 2009-12-01 13:03:23 Re: BUG #5221: errors converting string to utf8