1

`

pre-logic:
def myCalc(name,nameVal):
  if (name == nameVal):
    return 1
  else:
    return 0

var_name=
myCalc(!Epulettipus!,"Lakóépület")

`

This doesn't work with accentuated strings. (But works with unaccentuated strings). What can I do?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
greyline
  • 391
  • 5
  • 14

1 Answers1

5

Put a u in front of the string so the interpreter knows it's Unicode.

myCalc(!Epulettipus!, u"Lakóépület")
Jason Scheirer
  • 18,002
  • 2
  • 53
  • 72