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

From: skmanji <skmanji(at)manji(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to restore a SQL-ASCII encoded database to a new UTF-8 db?
Date: 2011-10-09 07:39:16
Message-ID: 1318145956192-4884598.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can do this by converting the characters in raw dump file directly.

iconv -f 8859_1 -t UTF-8 backup.db.psql > backup.db.psql.utf8

Then convert the line in backup.db.psql.utf8 from:

SET client_encoding = 'SQL_ASCII';
to:
SET client_encoding = 'UTF8';

--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-restore-a-SQL-ASCII-encoded-database-to-a-new-UTF-8-db-tp1918020p4884598.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message fanlijing 2011-10-09 08:00:53 how to save a bytea value into a file?
Previous Message Pavel Stehule 2011-10-09 03:35:26 Re: [9.2devel] why it doesn't do index scan only?