On 12-06-13 8:58 AM, Jukka Rahkonen wrote: > Hi, > > How could I prevent the following problem: > > ERROR 1: INSERT command for new feature failed. > ERROR: invalid byte sequence for encoding "UTF8": 0xc56b > > Command: INSERT INTO "test_table" ("wkb_geometry" , "address", > "osoite") VALUES ('0101000020FB0B0000AB1109023B190841634688040C595941' > ::GEOMETRY, 'Jurmo ┼kershamn', 8) RETURNING "ogc_fid" > ERROR 1: Terminating translation prematurely after failed > translation of layer test_table (use -skipfailures to skip errors) > > I believe that my Spatialite db is in order and uses UTF-8 internally. The > target PostGIS db is also using UTF-8. > I am on a Windows XP machine with Finnish locale settings. >
Hmm I have had to use the magical "-W" switch before with shp2pgsql to specify encoding; I wonder if with ogr2ogr you should pass a "-sql" switch with something like "SET CLIENT_ENCODING to UTF8" ? But I haven't tested that. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev