OGR: Converting unicode fields into texts

المشرف العام

Administrator
طاقم الإدارة
I have a shapefile (.shp) with field names wriiten in Japanese language.I wanted to read the field names in Japanese language using the program below:

infile = r"E:\shp\test.shp"ds = ogr.Open(infile,0); slayer = ds.GetLayer(0)fieldNames = [slayer.GetLayerDefn().GetFieldDefn(i).GetName() for i in range(0,slayer.GetLayerDefn().GetFieldCount())]for x in fieldNames: print xBut, it printed out as follows, which is not readable.



أكثر...
 
أعلى