Change encoding of SQL_ASCII database with multibyte chars?

Поиск
Список
Период
Сортировка
От leon-postgres@comvision.com
Тема Change encoding of SQL_ASCII database with multibyte chars?
Дата
Msg-id 511BB457-31C2-11D9-B1BF-000A95E07710@comvision.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Karim Nassar
Дата:
Сообщение: Re: 24x7x365 high-volume ops ideas
Следующее
От: ru.igarashi@usask.ca
Дата:
Сообщение: Re: I spoke with Marc from the postgresql mailing list.