2 ms·
You can get the correct result by normalizing the string first: >>> import unicodedata >>> print unicodedata.normalize('NFC', u'Les Mise\u0301rables')[
by simonw 17y ago
You can get the correct result by normalizing the string first:
>>> import unicodedata
>>> print unicodedata.normalize('NFC', u'Les Mise\u0301rables')[::-1]
selbarésiM seL
- deleted 17y ago[deleted]
- fh 17y agoThat's in some sense even more broken: Not all combined characters have a normalized form, so the result is even less predictable. (I don't have an example ready.)