[gdal-dev] Chinese Character for field name in ESRI Shapefile Problem

Iván Sánchez Ortega ivan at sanchezortega.es
Mon Oct 12 00:50:23 PDT 2015


El Lunes 12. octubre 2015 15.43.58 Jhon Chin escribió:
> Hi, everybody:
> 
> I'm now trying to write polygonized result into an esri shapefile, and I
> tried to add some field to the attribute table in the shapefile. But it 
> corrupted when i was trying to create an *ogrfielddefn* instance.The code 
> goes like this:
>            OGRFieldDefn oField("归一化植被指数",OFTInteger);


Are you using the "ENCODING" option as described here?

http://www.gdal.org/drv_shapefile.html
https://trac.osgeo.org/gdal/ticket/4359

And double-check that you're using the same encoding in your source code 
files.

-- 
Iván Sánchez Ortega <ivan at sanchezortega.es> <ivan at geonerd.org> 
<ivan at mazemap.no>


More information about the gdal-dev mailing list