Change encoding of SQL_ASCII database with multibyte chars? - Mailing list pgsql-general

From leon-postgres@comvision.com
Subject Change encoding of SQL_ASCII database with multibyte chars?
Date
Msg-id 511BB457-31C2-11D9-B1BF-000A95E07710@comvision.com
Whole thread Raw
List pgsql-general
Hello, there! I recently migrated a medium-sized db from SQL Server to
postgres. A couple months after the migration, I noticed I was having
some problems retrieving some data via the JDBC driver. The problem
turned out to be multi-byte characters (smart quotes, etc) in the
SQL_ASCII database.

As I understand it, I need to change the encoding to UNICODE in order
to support non-English characters, smart quotes, etc. The trick is that
I would like to preserve the small quantity of multi-byte characters
that are already in the database.

I've tried dumping the db, changing the encoding in the CREATE DATABASE
command to UNICODE, and reloading the dump, but I get errors like
"ERROR:  invalid byte sequence for encoding "UNICODE": 0xfd3130 ",
which makes me afraid that I'm losing data.

Is there any way to re-encode my database that will turn the (possibly
mangled) multi-byte characters back into their original form?

Thanks for reading....

Leon


pgsql-general by date:

Previous
From: Karim Nassar
Date:
Subject: Re: 24x7x365 high-volume ops ideas
Next
From: ru.igarashi@usask.ca
Date:
Subject: Re: I spoke with Marc from the postgresql mailing list.