[issue44217] [IDLE] Weird behaviour in IDLE while dealing with non-ASCII characters

Steven D'Aprano report at bugs.python.org
Sun May 23 12:09:40 EDT 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

The smiley emoji 😀 is U+1F600 which is outside of the Unicode Basic Multilingual Plane (BMP). IDLE's underlying graphical toolkit, Tcl/Tk, has problems with Unicode characters outside of the BMP, so this may not be fixable by us.

If all you want is to print the emoji, the best way is one of these:

    print('\U0001F600')

    print('\N{GRINNING FACE}')


or use another editor or IDE. Python itself has no problems here, it is just the IDLE editor.

I'm not a Tcl/Tk expert, but it looks like they may be working towards fixing this:

https://core.tcl-lang.org/tips/doc/trunk/tip/542.md

----------
nosy: +steven.daprano

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


More information about the Python-bugs-list mailing list