ArcPy and File Geodatabase Character Encoding

المشرف العام

Administrator
طاقم الإدارة
I have a JSON file containing special characters, which can be represented in Unicode. However, as soon as I export that JSON file to a file geodatabase using arcpy, the special characters all "break," i.e., they come out as something different. A Google search tells me (via this table listing string representations of special characters) that the character I'm having a problem with in my sample dataset is in UTF-8/Latin-1.

The code I'm using for this is:

arcpy.JSONToFeatures_conversion(jsonFileName, os.path.join(fgdbPath, outputName))I have also specified the encoding for the Python (2.7) file via:

import sysreload(sys)sys.setdefaultencoding('utf-8')I have also varied the above with "latin-1" and various other specifications for the encoding, mostly experimentally as I have little experience with encoding.


But regardless, where the content of my JSON file is for example <strong>"B

أكثر...
 
أعلى