How to restore a SQL-ASCII encoded database to a new UTF-8 db?

From: Postgres User <postgres(dot)developer(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to restore a SQL-ASCII encoded database to a new UTF-8 db?
Date: 2009-05-22 02:27:30
Message-ID: b88c3460905211927x78aa6bd3q65a52df345c3d3b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a database that was created with SQL-ASCII encoding
(unfortunately). I ran pg_restore to load the struct and data into a
new database with UTF-8 encoding but no surprise- I'm seeing this
error for a number of tables:

pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encod
ing "UTF8"

Any idea on how I can copy the data between these databases without
any data loss? For some reason I thought that a conversion to Unicode
would be easy.

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Bailey 2009-05-22 06:40:10 Re: referring to calculated column in sub select
Previous Message Duan Ligong 2009-05-22 01:48:19 cascade deleting