2017-01-06 I hate programming sometimes#
This is the kind of example I never imagined maybe because I trust too much the code I write and I can’t see it fail for something like what follows.
s1 = 'İ' s2 = s1.lower() print(s1, s2) print(len(s1), len(s2)) b = bytes(s2, "utf-8") print(chr(b), chr(b))
İ i̇ 1 2 i Ì
Do you believe it?
The length of a lower case character is longer.
I need a drink.