[postgis-users] Encoding problem UTF-8

Bob Pawley rjpawley at shaw.ca
Wed Dec 14 10:28:40 PST 2011


Hi

I am attempting to import a dxf file to Postgis using ogr2ogr version 1.8 running on Win 7.

I get errors “invalid byte sequence for encoding "UTF8": 0xfe” using the following command in command prompt. Points and text are not being imported.

set DXF_INLINE_BLOCKS=false&set DXF_MERGE_BLOCK_GEOMETRIES=false&&ogr2ogr --config DXF_ENCODING UTF-8 -f "PostgreSQL" PG:"host=localhost user=postgres dbname=IDW password=calgary0623" Water_Ex.dxf -nln Import_PID  -overwrite -skipfailures 

During research of this problem I came upon a suggestion to check with the Postgre list.

Can anyone suggest a solution?

Following are a few of the error messages.

Bob

LIST', '{1,1,1}', 0) RETURNING ogc_fid
ERROR 1: INSERT command for new feature failed.
ERROR:  invalid byte sequence for encoding "UTF8": 0xfe

Command: INSERT INTO "import_pid" ("wkb_geometry" , "layer", "subclasses", "exte
ndedentity", "entityhandle", "blockname", "blockscale", "blockangle") VALUES (Ge
omFromEWKT('SRID=-1;POINT (0.003291735334244 -0.065895915915561)'::TEXT) , 'MC-A
TT', 'AcDbEntity:AcDbBlockReference', '     4 tag_rev1 t      1 KEYTAG■C,10,0 RE
V_ID■C,10,0 REVISION■C,3,0 REVISED_BY■C,10,0 REVISED_ON■C,14,0 REV_TITLE■C,32,0
REV_BY_APP■C,16,0 APPROVEDBY■C,10,0 PENDING■C,1,0 PEND_MAIL■C,10,0', '327A', '_A
T_DIRLIST', '{1,1,1}', 0) RETURNING ogc_fid
ERROR 1: INSERT command for new feature failed.
ERROR:  invalid byte sequence for encoding "UTF8": 0xfe

Command: INSERT INTO "import_pid" ("wkb_geometry" , "layer", "subclasses", "exte
ndedentity", "entityhandle", "blockname", "blockscale", "blockangle") VALUES (Ge
omFromEWKT('SRID=-1;POINT (0.003291735334244 -0.065895915915561)'::TEXT) , 'MC-A
TT', 'AcDbEntity:AcDbBlockReference', '     4 tag_rev2 t      1 REV_ID■C,10,0 RE
V_DETAIL■C,50,0 REV_INT■N,3,0', '327B', '_AT_DIRLIST', '{1,1,1}', 0) RETURNING o
gc_fid
ERROR 1: INSERT command for new feature failed.
ERROR:  invalid byte sequence for encoding "UTF8": 0xfe


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111214/bc9d52de/attachment.html>


More information about the postgis-users mailing list