[issue30019] IDLE freezes when opening a file with astral characters

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue21084. Fixed by PR 16545 (see issue13153). It is virtually Eryk's workaround, but at the Tkinter level. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed

[issue30019] IDLE freezes when opening a file with astral characters

2017-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Eryk> I tried print(transurrogate(s)) from editor and it worked!, printing ' ' (though not near as pretty as here in Firefox. I have previously thought of scanning strings before inserting into Text widgets and converting astral chars to \U000n form,

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: #30209 has a file that cannot be opened and another description of symptoms. -- ___ Python tracker ___

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-07 Thread Eryk Sun
Eryk Sun added the comment: In Windows IDLE 3.x, you should still be able to print a surrogate transcoding, which sneaks the native UTF-16LE encoding around tkinter: def transurrogate(s): b = s.encode('utf-16le') return ''.join(b[i:i+2].decode('utf-16le', 'surrogatepass')

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your report touches on four different issues. 1. IDLE uses tkinter for the GUI and tkinter wraps tcl/tk 8.6 or earlier, which only handles Basic Multilingual Plane chars (codepoints to ). The gun and knife chars are out of that range. I have read