pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5847: pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0x96
3+ messages / 3 participants
[nested] [flat]

* BUG #5847: pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0x96
@ 2011-01-25 04:18  Vijayakumar <mails4vijayakumar@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Vijayakumar @ 2011-01-25 04:18 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5847
Logged by:          Vijayakumar
Email address:      mails4vijayakumar@gmail.com
PostgreSQL version: 8.2
Operating system:   windows
Description:        pg_restore: [archiver (db)] COPY failed: ERROR:  invalid
byte sequence for encoding "UTF8": 0x96
Details: 

while restoring my database i am getting the error as 



D:\EnterpriseDB\Postgres\8.2\bin\pg_restore.exe -i -h localhost -p 5432 -U
postgres -d asasas -v "E:\backupcsv\erode.backup"
pg_restore: connecting to database for restore
pg_restore: creating TABLE generalledgermaster_erode
pg_restore: restoring data for table "generalledgermaster_erode"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1624; 0 121663 TABLE DATA
generalledgermaster_erode postgres
pg_restore: [archiver (db)] COPY failed: ERROR:  invalid byte sequence for
encoding "UTF8": 0x96
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 generalledgermaster_erode, line 374
pg_restore: creating CONSTRAINT generalledgermaster_erode_pkey
pg_restore: setting owner and privileges for TABLE
generalledgermaster_erode
pg_restore: setting owner and privileges for CONSTRAINT
generalledgermaster_erode_pkey
WARNING: errors ignored on restore: 1

Process returned exit code 1.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #5847: pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0x96
@ 2011-01-25 11:50  Rodriguez Fernando <rodriguez@ort.edu.uy>
  parent: Vijayakumar <mails4vijayakumar@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Rodriguez Fernando @ 2011-01-25 11:50 UTC (permalink / raw)
  To: pgsql-bugs

El 25/01/2011 2:18, Vijayakumar escribió:
> The following bug has been logged online:
>
> Bug reference:      5847
> Logged by:          Vijayakumar
> Email address:      mails4vijayakumar@gmail.com
> PostgreSQL version: 8.2
> Operating system:   windows
> Description:        pg_restore: [archiver (db)] COPY failed: ERROR:  invalid
> byte sequence for encoding "UTF8": 0x96
> Details:
>
> while restoring my database i am getting the error as
>
>
>
> D:\EnterpriseDB\Postgres\8.2\bin\pg_restore.exe -i -h localhost -p 5432 -U
> postgres -d asasas -v "E:\backupcsv\erode.backup"
> pg_restore: connecting to database for restore
> pg_restore: creating TABLE generalledgermaster_erode
> pg_restore: restoring data for table "generalledgermaster_erode"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 1624; 0 121663 TABLE DATA
> generalledgermaster_erode postgres
> pg_restore: [archiver (db)] COPY failed: ERROR:  invalid byte sequence for
> encoding "UTF8": 0x96
> 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 generalledgermaster_erode, line 374
> pg_restore: creating CONSTRAINT generalledgermaster_erode_pkey
> pg_restore: setting owner and privileges for TABLE
> generalledgermaster_erode
> pg_restore: setting owner and privileges for CONSTRAINT
> generalledgermaster_erode_pkey
> WARNING: errors ignored on restore: 1
>
> Process returned exit code 1.
>
Hola a todos, la base de donde la respaldastes la tenias en utf-8, 
win1252, sql_ascii o latin1?
Si aun tenes la base original proba pg_dump -Ft -EUTF8


saludos Fernando



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #5847: pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0x96
@ 2011-01-31 01:33  Robert Haas <robertmhaas@gmail.com>
  parent: Vijayakumar <mails4vijayakumar@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Robert Haas @ 2011-01-31 01:33 UTC (permalink / raw)
  To: Vijayakumar <mails4vijayakumar@gmail.com>; +Cc: pgsql-bugs

On Mon, Jan 24, 2011 at 11:18 PM, Vijayakumar
<mails4vijayakumar@gmail.com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5847
> Logged by:          Vijayakumar
> Email address:      mails4vijayakumar@gmail.com
> PostgreSQL version: 8.2
> Operating system:   windows
> Description:        pg_restore: [archiver (db)] COPY failed: ERROR:  invalid
> byte sequence for encoding "UTF8": 0x96
> Details:
>
> while restoring my database i am getting the error as
>
>
>
> D:\EnterpriseDB\Postgres\8.2\bin\pg_restore.exe -i -h localhost -p 5432 -U
> postgres -d asasas -v "E:\backupcsv\erode.backup"
> pg_restore: connecting to database for restore
> pg_restore: creating TABLE generalledgermaster_erode
> pg_restore: restoring data for table "generalledgermaster_erode"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 1624; 0 121663 TABLE DATA
> generalledgermaster_erode postgres
> pg_restore: [archiver (db)] COPY failed: ERROR:  invalid byte sequence for
> encoding "UTF8": 0x96
> 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 generalledgermaster_erode, line 374
> pg_restore: creating CONSTRAINT generalledgermaster_erode_pkey
> pg_restore: setting owner and privileges for TABLE
> generalledgermaster_erode
> pg_restore: setting owner and privileges for CONSTRAINT
> generalledgermaster_erode_pkey
> WARNING: errors ignored on restore: 1
>
> Process returned exit code 1.

You haven't provided a whole lot of information to go on, here - but
apparently you have some invalidly encoded data in your dump file.
Older versions of PostgreSQL weren't as strict about preventing such
data from creeping into the database, which can lead to problems of
this type.  Your best bet is to probably edit the dump before
restoring it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-01-31 01:33 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 04:18 BUG #5847: pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0x96 Vijayakumar <mails4vijayakumar@gmail.com>
2011-01-25 11:50 ` Rodriguez Fernando <rodriguez@ort.edu.uy>
2011-01-31 01:33 ` Robert Haas <robertmhaas@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox