The backup was created from a database with the UTF8UTF-8 encoding using pg_dumppg_dump. The backup is in the tartar format.
I then created a new database on another server running the same version of postgreSQLPostgreSQL (8.2.4) using this command:
createdb -E utf8 db1
createdb -E utf8 db1 When running pg_restorepg_restore I get the following error:
pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520
pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520 The original databse is no longer available.
How can I restore this data or find the byte sequence that is causing the problem?