How to restore a SQL-ASCII encoded database to a new UTF-8 db? - Mailing list pgsql-general

From Postgres User
Subject How to restore a SQL-ASCII encoded database to a new UTF-8 db?
Date
Msg-id b88c3460905211927x78aa6bd3q65a52df345c3d3b@mail.gmail.com
Whole thread Raw
Responses Re: How to restore a SQL-ASCII encoded database to a new UTF-8 db?  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Re: How to restore a SQL-ASCII encoded database to a new UTF-8 db?  (Tommy Gildseth <tommy.gildseth@usit.uio.no>)
List 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

pgsql-general by date:

Previous
From: Duan Ligong
Date:
Subject: cascade deleting
Next
From: Alex Thurlow
Date:
Subject: Re: Tuning resource parameters for a logging database.