This is a discussion on Backup and restore UTF8 data within the Pgsql General forums, part of the PostgreSQL category; --> Hi, I am trying to backup an installation (8.0.3) and restore it to a new (8.2.1) installation. I am ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I am trying to backup an installation (8.0.3) and restore it to a new (8.2.1) installation. I am am running the following command the backup the data. pg_dumpall > outfile Then on the new machine I am simply running: ENCODING=UTF8 psql -f outfile postgres I get the following error for some of the records. psql Does anybody know what I can do to fix this? Benjamin ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/ |
| ||||
| On Fri, 2007-01-12 at 16:02 -0800, Benjamin Arai wrote: > > psql > "UTF8": 0x92 > > Does anybody know what I can do to fix this? Here is a copy-paste from 8.1 release notes: ================================================== ================ 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 iconv -c -f UTF-8 -t UTF-8 -o cleanfile.sql dumpfile.sql. The -c option removes invalid character sequences. A diff of the two files will show the sequences that are invalid. iconv reads the entire input file into memory so it might be necessary to use split to break up the dump into multiple smaller files for processing. ================================================== ================ This is also valid for your problem. Regards, -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBFqCLzpme12CBXnxERAgVNAJ9l9pVBjlwv0E/3LXtA//CvAvjz1gCfdpdk amxnAqVrfFJYBLltYP/wWK8= =0HSA -----END PGP SIGNATURE----- |