Hi,

Great to find an awesome geospatial library!

I could read the field names of a shapefile in Japanese characters by applying 
the following setting in Python 3 program.
os.environ['SHAPE_ENCODING'] = "Shift_JIS"

fieldname = in_feature.GetField('Name')

However, I could not write the fieldnames in Japanese characters.
I tried as follows:

out_layer.CreateField(ogr.FieldDefn('Name', ogr.OFTString))
out_feature = ogr.Feature(out_layer.GetLayerDefn())

out_feature.SetField('Name', fieldname)
out_layer.CreateFeature(out_feature)

Japanese characters lost while reading the files wriiten with the above 
procedure.

I hope someone can assist me in this matter.
Thanks you.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to