I'm new to python and trying to write a python script using the field calculator in ArcMap for a specific field in an attribute table that will calculate and place the values in the other field. My Pre-logic Script Code:
def calcVal(inVal):
values = {
"BABBBBBBBB":1,
"CCCCCCCCCC":2,
"DDDDDDDDDD":3,
“EEEEEEEEEEE”:4,
etc...}
if inVal in values.keys():
return values[inVal]
else:
pass
Character “A” in 1st condition ("BABBBBBBBB":1) is non english character. Field calculator does not recognize this text value. Coding is UTF8.
Is a special symbols in python with who I can substitute this non-english character, like % or *?
Or, it is possible to configure this code to recognize UTF8 coding?