Terry J. Reedy <[email protected]> added the comment:
A week ago, I thought that the astral solution was to always replace with the
\U escape. With this patch, we can and should send them to read-only text
windows, and let the OS and font display it or a substitute. On Windows, at
least, the emoji which beginners most often want to use get displayed.
Elsewhere, we will have to check and do some follow-up patches. For using file
names with astral chars results, on Windows, in six large boxes, and when the
file is saved, it is saved in a new file with the boxes, not the original file.
Such file names are not added to the recent files list, or maybe list boxes
cannot handle them.
Code is another issue. Astral chars in files could be replaced when read.
Unfortunately, I believe some are legal identifier chars. On the clipboard, on
Windows, astral chars become sequences of 6 surrogates.
>>> r.clipboard_clear()
>>> r.clipboard_append('🚀')
>>> r.clipboard_get()
'\udced\udca0\udcbd\udced\udcba\udc80'
Perhaps we should try to intercept paste and replace such sequences with the \U
escape.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue13153>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com