Re: invalid byte sequence for encoding "UTF8"

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gary Benade <gary(at)softwareguys(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: invalid byte sequence for encoding "UTF8"
Date: 2007-01-16 14:44:05
Message-ID: 20070116144405.GE8182@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 16, 2007 at 03:40:52PM +0200, Gary Benade wrote:
> I used shp2pgsql.exe to create an import sql for my gis database.
> The resultant sql has data like this in it.INSERT INTO "gis"."sa_area" ("label","type","level",the_geom) VALUES ('MÔRELIG','0x2','2','0106000000010000000');
> The Ô is ascii char 212.
> This wont import, PSQL returns
> ERROR: invalid byte sequence for encoding "UTF8": 0xd452
> 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"

Well, your data isn't UTF8 and yet that's what you told the server.
Either make the data UTF8, or tell the server the actual encoding
used...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message richard lavoie 2007-01-16 15:02:41 Elegant copy of a row using PL
Previous Message John DeSoi 2007-01-16 14:39:10 Re: Dynamic loading of Perl Code in Postgres functions