Skip site navigation (1) Skip section navigation (2)

Re: Invalid Byte Sequence for Encoding Error

From: Steve T <steve(at)retsol(dot)co(dot)uk>
To: "Ridvan Lakas ng Bayan S(dot) Baluyos" <ridvan(at)baluyos(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Invalid Byte Sequence for Encoding Error
Date: 2008-09-15 08:40:34
Message-ID: 1221468034.3603.278.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I don't think that is a problem with 32/64 bit, as I've recently taken a
32 bit dump onto a 64 bit ok - but with a similar problem to yourself.
The problem seems to be more that the original instance was created with
an encoding that is not compatible with the encoding of the new 64 bit
instance (ie as created by initdb). Take a look at the dump using a
'head' type command - it will show the encoding of the extract. You may
then have to recreate your instance on the 64 bit box with the correct
encoding (I think that the default for initdb is to look at your
'locale' and use that to create the encoding) - look at man initdb
(--encoding option).

On Mon, 2008-09-15 at 15:42 +0800, Ridvan Lakas ng Bayan S. Baluyos
> Hi list,
> I'm trying to migrate a database to another server. However, the
> source is 32-bit while the server that I'm going to have it
> transferred is 64-bit. Is there any workaround on this? I'm just using
> a simple `pg_dump` to migrate the database.
> Source DB: Linux <censored> 2.6.9-42.0.8.EL #1 Tue Jan 30 12:10:22
> EST 2007 i686 i686 i386 GNU/Linux
> client - psql (PostgreSQL) 8.1.4
> server - PostgreSQL 8.1.4 on i686-redhat-linux-gnu, compiled by GCC
> gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
> Target DB: Linux <censored> 2.6.15-28-amd64-generic #1 SMP PREEMPT Wed
> Jul 18 22:51:22 UTC 2007 x86_64 GNU/Linux
> client - psql (PostgreSQL) 8.2.7
> server - PostgreSQL 8.2.7 on x86_64-unknown-linux-gnu, compiled by GCC
> gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
> And here's the error when dumping the data to the target DB:
> ERROR: invalid byte sequence for encoding "UTF8": 0x80
> 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".
> Thanks in advance for your help.
> Ridvan
> -- 
> リヅバン バルヨス
> ridvan(dot)baluyos(at)qualservcentral(dot)com
> Registered Linux User #439466
> Registered Ubuntu User #16034
> Q: Have you heard of the Object-Oriented way to get wealthy?
> A: Inheritance. 

Steve Tucknott
ReTSol Ltd

DDI:         01323 488548
Mobile:     0773 671 5772

In response to

pgsql-novice by date

Next:From: Rob RichardsonDate: 2008-09-15 13:56:01
Subject: Specify tables to be backed up
Previous:From: Ridvan Lakas ng Bayan S. BaluyosDate: 2008-09-15 07:42:11
Subject: Invalid Byte Sequence for Encoding Error

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group