Re: Finding bad bye in "invalid byte sequence" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: robert <robertlazarski(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Finding bad bye in "invalid byte sequence" error
Date: 2007-12-14 17:07:02
Message-ID: 8910.1197652022@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

robert <robertlazarski(at)gmail(dot)com> writes:
> 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".

Well, that isn't UTF8, and it isn't plain ASCII either. I'm betting
it's a single-byte encoding, probably one of the ISO-8859 series.
Have you looked at the data to see what *you* think the character is?
(Feed the script to psql with -f, not <, to get a line number for
the error.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-12-14 17:08:38 Re: Hijack!
Previous Message Douglas McNaught 2007-12-14 17:05:20 Re: Finding bad bye in "invalid byte sequence" error