[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

Ronald Oussoren report at bugs.python.org
Fri Nov 13 11:35:31 EST 2020


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

With 8.6.10:

>>> print(ascii("😀")) raises the SyntaxError mentioned earlier
>>> print(ascii(input())) works and prints:
'\udced\udca0\udcbd\udced\udcb8\udc84'

In an editor window I don't get spurious text, but syntax colouring is a bit off: The text after the closing quote is coloured as if it is inside the string literal. That continues for the characters on the next line

----------

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


More information about the Python-bugs-list mailing list