[issue45105] Incorrect handling of unicode character \U00010900

Max Bachmann report at bugs.python.org
Sun Sep 5 12:32:08 EDT 2021


Max Bachmann <kontakt at maxbachmann.de> added the comment:

As far as a I understood this is caused by the same reason:

```
>>> s = '123\U00010900456'
>>> s
'123𐤀456'
>>> list(s)
['1', '2', '3', '𐤀', '4', '5', '6']
# note that everything including the commas is mirrored until ] is reached
>>> s[3]
'𐤀'
>>> list(s)[3]
'𐤀'
>>> ls = list(s)
>>> ls[3] += 'a'
>>> ls
['1', '2', '3', '𐤀a', '4', '5', '6']
```

Which as far as I understood is the expected behavior when a right-to-left character is encountered.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45105>
_______________________________________


More information about the Python-bugs-list mailing list