pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed8.1: import of 8.0 dump fails with UTF-8 error
2+ messages / 2 participants
[nested] [flat]
* 8.1: import of 8.0 dump fails with UTF-8 error
@ 2005-12-11 16:36 Thomas Mueller <news-exp-dec05@tmueller.com>
2005-12-12 02:48 ` Re: 8.1: import of 8.0 dump fails with UTF-8 error Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Mueller @ 2005-12-11 16:36 UTC (permalink / raw)
To: pgsql-admin
Hello,
I did a pg_dumpall of all my Pg 8.0.3 databases, removed 8.0, installed
8.1 and tried to import the dump. One table in one database failed with:
ERROR: invalid UTF-8 byte sequence detected near byte 0x83
CONTEXT: COPY pwd_name, line 22428, column name: "t.tonnement"
So I exported that database with 8.0 as Inserts to a text file and tried
to fix it using iconv, but that fails as well:
# iconv -f UTF-8 -t UTF-8 dump.sql > dump-fixed.sql
iconv: illegal input sequence at position 2588882
How can I fix the sql script to import it?
I have Debian Linux 3.1.
Thanks a lot,
Thomas
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: 8.1: import of 8.0 dump fails with UTF-8 error
2005-12-11 16:36 8.1: import of 8.0 dump fails with UTF-8 error Thomas Mueller <news-exp-dec05@tmueller.com>
@ 2005-12-12 02:48 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2005-12-12 02:48 UTC (permalink / raw)
To: Thomas Mueller <news-exp-dec05@tmueller.com>; +Cc: pgsql-admin
Thomas Mueller wrote:
> Hello,
>
> I did a pg_dumpall of all my Pg 8.0.3 databases, removed 8.0, installed
> 8.1 and tried to import the dump. One table in one database failed with:
>
> ERROR: invalid UTF-8 byte sequence detected near byte 0x83
> CONTEXT: COPY pwd_name, line 22428, column name: "t.tonnement"
>
> So I exported that database with 8.0 as Inserts to a text file and tried
> to fix it using iconv, but that fails as well:
>
> # iconv -f UTF-8 -t UTF-8 dump.sql > dump-fixed.sql
> iconv: illegal input sequence at position 2588882
>
> How can I fix the sql script to import it?
> I have Debian Linux 3.1.
We have updated the 8.1.0 release notes to mention a fix:
Some users are having problems loading UTF-8 data into 8.1.X.
This is because previous versions allowed invalid UTF-8 byte
sequences to be entered into the database, and this release
properly accepts only valid UTF-8 sequences. One way to correct a
dumpfile is to run the command <command>iconv -c -f UTF-8 -t
UTF-8 -o cleanfile.sql dumpfile.sql</>. The <literal>-c</> option
removes invalid character sequences. A diff of the two files will
show the sequences that are invalid. <command>iconv</> reads the
entire input file into memory so it might be necessary to use
<application>split</> to break up the dump into multiple smaller
files for processing.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-12-12 02:48 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-11 16:36 8.1: import of 8.0 dump fails with UTF-8 error Thomas Mueller <news-exp-dec05@tmueller.com>
2005-12-12 02:48 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox