Re: invalid byte sequence for encoding error

From: Nis Jorgensen <nis(at)superlativ(dot)dk>
To: oliverrojo(at)anticogroup(dot)com
Cc: Postgresql Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: invalid byte sequence for encoding error
Date: 2006-05-19 08:39:55
Message-ID: 446D845B.8010505@superlativ.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oliver A. Rojo wrote:
> Hi!
>
> I've just recently upgraded my database from 7.4.8 to 8.0.1. Im dumping
> data i got from my old db to my new db but eventually an error occured
>
> ERROR: invalid byte sequence for encoding "UNICODE": 0xd141
>
> I tried setting the client encoding to UNICODE but to no avail.

I had exactly the same problem (7.4.7 -> 8.1.3). Apparently older pg
versions allowed for storing invalid utf-8 in text fields (ie the engine
did not check the bytes going in).

I fixed it by fixing the original db and dumping again. If this is not
desirable you can of course restore to a clean 7.4.8, fix, dump.

/Nis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver A. Rojo 2006-05-19 08:50:15 Re: invalid byte sequence for encoding error
Previous Message Dave Page 2006-05-19 07:50:35 Re: GUI Interface