Re: Backup and restore UTF8 data

From: Devrim GUNDUZ <devrim(at)CommandPrompt(dot)com>
To: Benjamin Arai <benjamin(at)araisoft(dot)com>
Cc: pgsql-admin-owner(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Backup and restore UTF8 data
Date: 2007-01-13 00:08:19
Message-ID: 1168646899.2918.28.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2007-01-12 at 16:02 -0800, Benjamin Arai wrote:
>
> psql:outfile:151275: ERROR: invalid byte sequence for encoding
> "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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-01-13 00:38:41 Re: FK Constraint on index not PK
Previous Message Benjamin Arai 2007-01-13 00:02:14 Backup and restore UTF8 data