RosettaCodeData/Task/String-length/Python/string-length-2.py

6 lines
105 B
Python

# The letter Alef
print len(u'\u05d0'.encode('utf-8'))
# 2
print len(u'\u05d0'.encode('iso-8859-8'))
# 1