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

From Martijn van Oosterhout
Subject Re: invalid byte sequence for encoding "UTF8"
Date
Msg-id 20071130100735.GD27784@svana.org
Whole thread Raw
In response to invalid byte sequence for encoding "UTF8"  (Glyn Astill <glynastill@yahoo.co.uk>)
List pgsql-general
On Fri, Nov 30, 2007 at 09:44:36AM +0000, Glyn Astill wrote:
> I've setup a postgres 8.2 server and have a database setup with UTF8
> encoding. I intend to read some of our legacy data into the table,
> this legacy data is in ASCII format, and as far as I know is 8 bit
> ASCII.

Your problem is that there is no such thing as "8-bit ASCII". Determine
what encoding the data is actually in and use that.

> Our migration utility does ask us to select the correct encoding for
> our database, and we select UTF8 but we still get the error. What do
> you guys think? Possibly the migration tools fault?

I think they mean to select the correct encoding for the data, what
encoding the database is in isn't relevent. The database can convert
any encoding you want to use to UTF-8 as required.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

Attachment

pgsql-general by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: pgcrypto functions fail for asymmetric encryption/decryption
Next
From: Madison Kelly
Date:
Subject: Moving lock file (/tmp/.s.PGSQL.)