Thread: 22021: invalid byte sequence for encoding \"UNICODE\": 0xe16d61"

22021: invalid byte sequence for encoding \"UNICODE\": 0xe16d61"

From
"Lucas Sultanum"
Date:
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.269 / Virus Database: 264.12.4 - Release Date: 27/10/2004

Re: 22021: invalid byte sequence for encoding \"UNICODE\":

From
Andreas Pflug
Date:
Lucas Sultanum wrote:
>
> I am not sure if this is a bug or I am doing something wrong. When I
> execute the following command (*insert into a_cadclias values
> ('6542','65465','amaro','ámaro')*)  on pgAdmin III Query it works pretty
> well, but when I try to do the same through a C# App connecting to the
> database through an ODBC driver I get the following error:
>
> *"ERROR: 22021: invalid byte sequence for encoding \"UNICODE\": 0xe16d61"*

Sounds as if you're not using the correct client encoding; your app is
probably non-unicode, but you're using client encoding Unicode.

Regards,
Andreas