Re: invalid byte sequence for encoding error - Mailing list pgsql-general

From Nis Jorgensen
Subject Re: invalid byte sequence for encoding error
Date
Msg-id 446D845B.8010505@superlativ.dk
Whole thread Raw
In response to invalid byte sequence for encoding error  ("Oliver A. Rojo" <oliverrojo@anticogroup.com>)
Responses Re: invalid byte sequence for encoding error
List 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


pgsql-general by date:

Previous
From: "Dave Page"
Date:
Subject: Re: GUI Interface
Next
From: "Oliver A. Rojo"
Date:
Subject: Re: invalid byte sequence for encoding error