v8.3 + UTF8 errors when restoring DB

From: "Mitchell D(dot) Russell" <mitchell(dot)russell(at)gmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: v8.3 + UTF8 errors when restoring DB
Date: 2008-03-09 09:45:57
Message-ID: 47d3b1dd.1d80400a.379c.fffff392@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

New to the list, so please forgive me in advance :)

I've been running 8.2 on windows server 2003 for quite some time now. The
database that I take care of stores records with various languages in it
(russian, chinese, etc) and has been working fine.

I did a PG_dump of the database tonight, and went to restore it to my newly
created database (WIN2152 encoding), which worked fine, but when I go to
retrieve the data via my code (.NET c#), I get errors like :

character 0x8f of encoding "WIN1252" has no equivalent in "UTF8"
character 0x81 of encoding "WIN1252" has no equivalent in "UTF8"
character 0x9d of encoding "WIN1252" has no equivalent in "UTF8"

The database driver is set to unicode mode, so I turned that off, but of
course end up with gibberish instead of the russian and chinese that were
there before.

So then I tried creating a new database with unicode formatting and
restoring my 8.2 dump file to that, when I do that, I get these errors
(using PSQL):

ERROR: invalid byte sequence for encoding "UTF8": 0x92
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".

CONTEXT: COPY cin_tbl_data, line 6
ERROR: invalid byte sequence for encoding "UTF8": 0x99
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".

so I just don't know what to do. my 8.2 database used SET client_encoding =
'SQL_ASCII'; according to the dump file - so I can't wrap my head around why
I can't get this data to come out.

Any help would be very much appreciated.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matt Culbreth 2008-03-09 09:53:40 Re: Cumulative (Running) Sum
Previous Message Webb Sprague 2008-03-09 06:51:14 Re: data import - duplicates