Terry J. Reedy <tjre...@udel.edu> added the comment:

In IDLE on Windows the following prints the first 3 astral planes in a couple 
of minutes.

for i in range(0x10000, 0x40000, 32):
    chars = ''.join(chr(i+j) for j in range(32))
    print(hex(i), chars)

Perhaps half of the assigned chars in the first plane are printed instead of 
being replaced with a narrow box. This includes emoticons as foreground color 
outlines on background color.  Maybe all of the second plane of extended CJK 
chars are printed.  The third plane is unassigned and prints as unassigned 
boxes (with an X).

Fixing OS graphics or tk is out of scope for us.  Preventing hangs or crashes 
when using tkinter is.  On Mac, refusing to insert any astral char into a tk 
widget might be the best solution.  Serhiy, could that be done in 
tkinter/_tkinter?

On Linux, the situation appears to be more complex.  The SO questioner
https://stackoverflow.com/questions/64615570/why-do-some-emoticons-cause-python-idle-to-crash-on-ubuntu
could print the two multicolor 'grinning face with smiling eyes' 😄, which fails 
for Serhiy, but not the simpler thumbsup 👍.  I don't know if we can detect 
fonts that cause crashes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42225>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to