Re: Problem while restoring a database from SQL_ASCII to UTF-8 - Mailing list pgsql-general

From Peter Geoghegan
Subject Re: Problem while restoring a database from SQL_ASCII to UTF-8
Date
Msg-id CAEYLb_UAVouJP7fnN7qhbO7KmcJ4HG0b+kh2ef95dh4xKB6wEg@mail.gmail.com
Whole thread Raw
In response to Re: Problem while restoring a database from SQL_ASCII to UTF-8  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
On 6 June 2012 14:12, Adrian Klaver <adrian.klaver@gmail.com> wrote:
> SQL_ASCII is not an encoding, it is basically a way of saying encoding
> ignored. Given that, outside knowledge of the encoding used for data
> inserted into the database is needed to make the conversion to UTF8. In
> other words do you have any idea of what encoding was used by the clients
> that supplied data to the database?

You're going to have to manage this process carefully. I believe the
best tool for the job is pgloader:

http://pgfoundry.org/projects/pgloader/

It's certainly not inconceivable that this sort of tool could
automagically deduce encoding (albeit often inconclusively) in much
the same manor as modern web browsers attempt to when they have no
alternative. I don't see much demand for that though.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Problem while restoring a database from SQL_ASCII to UTF-8
Next
From: Tom Lane
Date:
Subject: Re: I'd like to learn a bit more about how indexes work