Invalid byte sequence for encoding "UTF8"

From: "Neil Saunders" <n(dot)j(dot)saunders(at)gmail(dot)com>
To: pgsqlnovice <pgsql-novice(at)postgresql(dot)org>
Subject: Invalid byte sequence for encoding "UTF8"
Date: 2007-05-14 21:23:04
Message-ID: ddcd549e0705141423w14feffebu21330422c0a6cf59@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

I'm at temping to migrate a database from a Windows installation
(8.1.4) to a Linux installation (8.2.4). I've successfully migrated
the schema, but now am running in to difficulties importing the data.

For manageability, I've separated the schema from the reference data,
which is dumped separately with the following command:

pg_dump --encoding=UTF8 --username=postgres
--format=c -f c:\tvp_data\currencies.data --data-only --table=currencies tvclive

Due to short sightedness, the Windows database encoding is SQL_ASCII.
The production database is UTF8. This produced an error, so I tried
using the --encoding=UTF8 on the pg_dump command line, but to no
avail:

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2279; 0 253991651
TABLE DATA currencies postgres
pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence
for encoding "UTF8": 0xe76169
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".
CONTEXT: COPY currencies, line 159
WARNING: errors ignored on restore: 1

I'd appreciate any assistance anyone could offer me with this - It's
driving me nuts!

Cheers,

Neil.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message John DeSoi 2007-05-15 12:23:34 Re: Invalid byte sequence for encoding "UTF8"
Previous Message Jim C. Nasby 2007-05-14 18:55:07 Re: How to use 2PC?