Re: Finding bad bye in "invalid byte sequence" error - Mailing list pgsql-general

From Douglas McNaught
Subject Re: Finding bad bye in "invalid byte sequence" error
Date
Msg-id 5ded07e00712140905g1cff2098tb82455c26bb2a72f@mail.gmail.com
Whole thread Raw
In response to Finding bad bye in "invalid byte sequence" error  (robert <robertlazarski@gmail.com>)
List pgsql-general
On 12/13/07, robert <robertlazarski@gmail.com> wrote:
> Hi all,
>
> I'm trying to hack my inserts script from mssql to work with postgres
> 8.1.9 - I can upgrade if need be. I'm getting this error:
>
> psql -h localhost atdev < fuk2.sql
> ERROR:  invalid byte sequence for encoding "UTF8": 0xe1204f
> HINT:  This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".

The cleanest way to fix this is to figure out what encoding the data
in your SQL script is (since I am assuming parts of it were dumped
directly out of MSSQL) and set client_encoding to that.  Your data is
almost certainly not straight 7-bit ASCII.

-Doug

pgsql-general by date:

Previous
From: Thomas Hart
Date:
Subject: Re: Hijack!
Next
From: Tom Lane
Date:
Subject: Re: Finding bad bye in "invalid byte sequence" error