Author terry.reedy
Recipients dmaxime, terry.reedy
Date 2019-12-23.22:22:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577139758.54.0.830255590615.issue39126@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-12-23 22:22:38terry.reedysetrecipients: + terry.reedy, dmaxime
2019-12-23 22:22:38terry.reedysetmessageid: <1577139758.54.0.830255590615.issue39126@roundup.psfhosted.org>
2019-12-23 22:22:38terry.reedylinkissue39126 messages
2019-12-23 22:22:38terry.reedycreate