I'm new to Python scripting with ArcGIS for Desktop and I have unicode characters (arabic) in my attribute table.
I want to use these characters in my script but when I try to do that the script does not work.
How can I use unicode characters in my script?
import arcpy arcpy.env.workspace = "c:/test" mxd=arcpy.mapping.MapDocument("CURRENT") listlyr = arcpy.mapping.ListLayers(mxd,"","") # hatta agar chand dataframe ham dashte bashim baz ham select ra anjam mdahad for a in listlyr: delim = arcpy.AddFieldDelimiters(a,"City") arcpy.SelectLayerByAttribute_management (a, "NEW_SELECTION", delim+"='u'\xd9\x86\xd9\x88\xd8\xb4\xd9\x87\xd8\xb1''")
u'\xd9\x86\xd9\x88\xd8\xb4\xd9\x87\xd8\xb1' means 'نوشهر'