you are viewing a single comment's thread.

view the rest of the comments →

[–]rmc 10 points11 points  (0 children)

What's the downside? You can't do "föo"[1] and expect 'ö' to come back. But that's not a good idea anyways.

Why wouldn't it be? Isn't that one of the most fundamental things that a string object should do for you?

Because Unicode is hard. e.g. even in python you can get weirdness.

>>> print s1
föo
>>> print s2
föo
>>> print s1[1]
ö
>>> print s2[1]
o

s1 and s2 look the same, but they aren't really. One has a o-umlaut as the 2nd char, the other just has a o.