[postgis-users] "Query failed: ERROR: invalid byte sequence forencoding"

yoda2nd yoda2nd at niacc.org
Sun Apr 5 17:14:15 PDT 2009


Hi Leo,

Actually I was not using the -W switch at all.  Gave it a shot with -W 
latin1, seems to have worked.  I have to re-do my import.

Thanks very much for your help!

Paragon Corporation wrote:
> Are you running the shp2pgsql with the -W latin1  switch?  (where latin1 can
> be replaced with an alternative encoding but hta toone usually works in most
> cases)
>
> That usually fixes these kinds of issues.
>
> Leo 
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of yoda2nd
> Sent: Sunday, April 05, 2009 5:28 PM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] "Query failed: ERROR: invalid byte sequence
> forencoding"
>
> Hello,
>
> I have been beating my head on the wall for several days now trying to
> figure out how to fix this issue.  I am trying to import several large
> shapefiles into PostGIS using shp2pgsql, however I keep getting the
> following error:
>
> psql:shapefile.sql:133787: ERROR:  invalid byte sequence for encoding
> "UTF8": 0xa8
>
> 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".
>
> The database is set to UTF8 and a search on google has not turned up much.
> The DB server is running on Win2k. 
>
> I am rather stumped since I have no idea if this is an issue on the server
> side, with the shapefile or with shp2pgsql.
>
> I have no idea how to solve this and was wondering if someone would be
> gracious enough to nudge me in the right direction here?
>
> Many thanks in advance.
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   




More information about the postgis-users mailing list