[issue13153] IDLE 3.x on Windows crashes when pasting non-BMP unicode

2018-06-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

AFAIK, the big new feature of tcl/tk 9.0 is intended to be full unicode 
support.  We can hope that 9.0 appears in time to be included in the 3.8 
installers.

Until then, I think filenames, user program output, and clipboard content 
should be checked for the presence of astral characters before being sent to a 
tk widget. For this issue, that means replacing the built-in <> handler. 
 Replace astral chars with \U000 escapes.  If the widget it a Text, tag the 
escape as 'Astral' and color it with the code context colors to distinguish it 
from escapes originally in the string.

Strings know their kind, but a request to expose that has been rejected.  
Pyshell currently compares the max codepoint to ''.  But it appears that we 
can detect kind with an O(1) expression.  For 3.6 and 3.7, "sys.getsizeof(s) == 
76 + len(s)".  For 3.8, "sys.getsizeof(s) == 48 + len(s)".  Does anyone know 
why the difference?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE 3.x on Windows crashes when pasting non-BMP unicode

2018-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -JBernardo, Ramchandra Apte, Rosuav, THRlWiTi, William.Schwartz, 
asvetlov, loewis, python-dev, roger.serwy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE 3.x on Windows crashes when pasting non-BMP unicode

2018-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg318863

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com