Re: invalid byte sequence for encoding "UTF8"

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: invalid byte sequence for encoding "UTF8"
Date: 2007-11-30 10:07:35
Message-ID: 20071130100735.GD27784@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-11-30 10:09:22 Re: [GENERAL] Empty arrays with ARRAY[]
Previous Message Marko Kreen 2007-11-30 10:06:37 Re: pgcrypto functions fail for asymmetric encryption/decryption