Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1 - Mailing list pgsql-general

From Vivek Khera
Subject Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1
Date
Msg-id 69B96115-2165-4F62-836A-ECD67BF46453@khera.org
Whole thread Raw
In response to Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1  ("Gregory S. Williamson" <gsw@globexplorer.com>)
List pgsql-general
On Nov 16, 2006, at 10:38 PM, Gregory S. Williamson wrote:

> Try converting the dump files encoding to UTF-8.  before 8.1 you could
> insert invalid characters into the DB because it accepted other
> encodings.  It will also dump other encoding.  For example, converting
> something with windows characters in it.
>
> iconv -f "WINDOWS-1251" -t "UTF-8" dump_file > converted_dump_file
>
> And import the converted file.  you may need to try a couple of
> different input encodings if you aren't sure what encoding was used
> when
> inserting data into the DB.

I had a similar situation a few months back.  I just ended up doing a
translation from UTF8 to UTF8 and dropping bad characters.  The db
itself had multiple different encodings for different records: some
were windows encoding, some were other.  It was just a mess.  I'm
glad 8.1 is more strict about this!


Attachment

pgsql-general by date:

Previous
From: Tomasz Ostrowski
Date:
Subject: Re: functions: stable/volatile
Next
From: "Gurjeet Singh"
Date:
Subject: Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1