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

From: "Manoj Agarwal" <ma(at)ockham(dot)be>
To: "'Adrian Klaver'" <adrian(dot)klaver(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem while restoring a database from SQL_ASCII to UTF-8
Date: 2012-06-07 03:30:38
Message-ID: 000301cd445d$ea6e8010$bf4b8030$@ockham.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

The encoding that is used by the clients that supplied data to the database
is ISO-8859-1.

Kind Regards,
Manoj Agarwal

-----Original Message-----
From: Adrian Klaver [mailto:adrian(dot)klaver(at)gmail(dot)com]
Sent: Wednesday, June 06, 2012 6:43 PM
To: Manoj Agarwal
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Problem while restoring a database from SQL_ASCII to
UTF-8

On 06/06/2012 04:30 AM, Manoj Agarwal wrote:
> Hi,
>
> I have a database in SQL_ASCII Encoding format from Postgresql-7.4.19.
> I have migrated to Postgresql-8.4.9 and to UTF-8 and want to restore
> this database in UTF-8 encoding. I am facing problem in restoring it
> as UTF-8. I have 29 tables in the database, out of which it is unable
> to restore 3 tables. It gives the following error:
>

>
>
> I have checked these three tables and I found that these tables
> contain special characters as values for some attributes for some
> records. I tried to use the procedure mentioned in the following link,
> which didn't worked for me:
>
> http://archives.postgresql.org/pgsql-admin/2004-07/msg00206.php
>
> I also have blobs in one table in this database, but I don't think/see
> any issues with them. Is there a way to restore the database from
> SQL_ASCII to UTF-8? Is there a way to restore the database as
> SQL_ASCII and then convert the Encoding to UTF-8? What is the consistency
level?
> Or are there chances of getting garbage?

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?

>
> Kind Regards,
>
> Manoj Agarwal
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2012-06-07 04:26:45 Re: Counting # of consecutive rows with specified value(s)?
Previous Message Ken Tanzer 2012-06-07 02:20:14 Counting # of consecutive rows with specified value(s)?