COPY 'invalid byte sequence for encoding "UTF8": 0xff' - Mailing list pgsql-general

From Chris Worley
Subject COPY 'invalid byte sequence for encoding "UTF8": 0xff'
Date
Msg-id 2c73a7ae0904210952u103d9115vf33e29ea322ace72@mail.gmail.com
Whole thread Raw
Responses Re: COPY 'invalid byte sequence for encoding "UTF8": 0xff'
List pgsql-general
Hello,

I get the following error when running a sql script containing a COPY command:

ERROR:  invalid byte sequence for encoding "UTF8": 0xff
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".

What I have done is write a perl script that selects out certain data
from a database and places it tab separated output between a line with
COPY from stdin and .\.  Just like the pg_dump output looks.

The data I have contains binary data from a tcp dump.  After running
my perl script I put the result through this command, to escape the
octets.  (thought i needed to do this)

cat data.dump | iconv -c -f utf8 -t utf8 > fixed.dump

Does anybody know how the dump pulls a column with binary data?  It is
a varchar column.

-chris worley

pgsql-general by date:

Previous
From: jc_mich
Date:
Subject: Re: Doubt about join queries
Next
From: Steve Crawford
Date:
Subject: Re: COPY 'invalid byte sequence for encoding "UTF8": 0xff'