Terry J. Reedy <tjre...@udel.edu> added the comment: Terminal codepages are irrelevant in the IDLE tk based gui. The problem is that windows codes astral chars as two surrogates. While tkinter can display them, after recent changes to _tkinter, the text widget cannot handle then properly when editing. This was explained in more detail on an earlier issue, but I will have to check if there is already an issue for fixing it.
For editing, one should use unicode escapes, as in >>> print('\U0001f60d') 😍 Python in a Windows console prints the surrogates separately. and in IDLE, one will see a black-and_white version of the smiley. ---------- title: Unexpected behavior when handling emoji under codec cp936 -> IDLE: Undesired behavior of emoji in editor. _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com