Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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\ --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

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
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!




pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group