2 ms·
But what is that sequence (I know the unicode sequence is listed below -- but is it some wierd edge-case)? — because if I manually compose/type those (and a few
by e12e 13y ago
But what is that sequence (I know the unicode sequence is listed below
-- but is it some wierd edge-case)? — because if I manually compose/type
those (and a few other characters) everything seems to work fine:
[edit: Python 3.2.3]
[edit: [GCC 4.7.2] on linux2]
>>> 'öo̧'[1:] #copy-paste
'o̧'
>>> 'öo̧'[::-1] # "reverse" also breaks
'̧oö'
#But for Japanese:
>>> '日本語'[1:]
'本語'
>>> '日本語'[:-1]
'日本'
>>> '日本語'[-1:]
'語'
>>> '日本語'[::-1]
'語本日'
# And Norwegian
>>> 'æåø'[::-1]
'øåæ'
# And a few "French" characters (in this case
# manually typed as alt+~+e, etc
>>> 'ẽêèe'[::-1]
'eèêẽ'
# And crucially for your example, typed as
# alt+"+o
>>> 'öo'[::-1]
'oö'
So is your initial example some kind of unicode-without-bom(b) or
something?
[edit2: I gather, that working with "pre-composed" characters work, and working with "de-composed" ones break. Which, while expected, is a little sad, I agree.]