[postgis-users] Encoding problem UTF-8
Nahum Castro
pedro1_72 at yahoo.com
Wed Dec 14 20:14:58 PST 2011
use psql2shp with the option -W with the def encoding perhaps cp1252
ie:
psql2shp -s 4326 -I -W cp1252 yourshape.shp layername > layername.sql.
Also you can use the psql2shp gui to import the file.
I don´t now other option but perhaps use LibreOffice, export de dbf file to the opendocument format then save as dbf but with UTF-8 encoding.
Hope this helps you.
Nahum
--
Nahum Castro
Leon, Guanajuato, Mexico
http://www.leon-linux.com
e-mail: pedro1_72 [en] yahoo [punto] com
________________________________
De: Bob Pawley <rjpawley at shaw.ca>
Para: postgis-users at postgis.refractions.net
Enviado: Miércoles, 14 de diciembre, 2011 12:28:40
Asunto: [postgis-users] Encoding problem UTF-8
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
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111214/5b9654eb/attachment.html>
More information about the postgis-users
mailing list