Terry J. Reedy <[email protected]> added the comment:
I am aware of this. Before the recent (Oct 4) fix for #13153, pasting an
astral character into an edit line or window crashed IDLE. After the fix, the
character appears (and printing such chars also works reliably). But astral
chars confuse the tk text widget, which cannot properly handle them. (I believe
that they are stored as 2 surrogate chars, displayed as one.)
I don't want to immediately replace such chars with escape sequences.
>>> hex(ord('😆'))
'0x1f606'
>>> '\U0001f606'
'😆'
The effect is limited to the line containing the odd char, and once entered,
strange cursor placement does not matter too much. But we probably should
document the situation and add an option to escape or unescape such chars.
----------
title: Some characters confuse the editor -> Non-bmp (astral) unicode
characters confuse the editor
versions: +Python 3.9 -Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39126>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com