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

yoda2nd yoda2nd at niacc.org
Sun Apr 5 14:27:45 PDT 2009


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.





More information about the postgis-users mailing list