Re: Problem while restoring a database from SQL_ASCII to UTF-8

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Problem while restoring a database from SQL_ASCII to UTF-8
Дата
Msg-id CAEYLb_UAVouJP7fnN7qhbO7KmcJ4HG0b+kh2ef95dh4xKB6wEg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problem while restoring a database from SQL_ASCII to UTF-8  (Adrian Klaver <adrian.klaver@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Problem while restoring a database from SQL_ASCII to UTF-8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: I'd like to learn a bit more about how indexes work