[issue23672] IDLE can crash if file name contains non-BMP Unicode characters

Terry J. Reedy report at bugs.python.org
Mon Mar 16 00:12:10 CET 2015


Terry J. Reedy added the comment:

The full path of a file being edited also ends up in the title bar and the Window menu.  I do not know whether the title bar is displayed by tk or the OS (Windows obviously displays the title of taskbar icons) but the Window list is definitely by tk.  It seems to me that files need two names: the system name used to open (and re-open) a file (utf-8 bytes on *nix?) and a tk name (BMD unicode) for display in the various places.

The current limitation to BMP names is a limitation of the tcl/tk gui framework.  I would like to add a workaround but do not consider its absence a bug.  I am proposing on python-list the addition of some builtin means to replace non-BMP chars with \U000xxxxx escapes for display purposes.  This would be generally useful for tkinter programming.  The thread is "Add str.bmp() to only expand non-BMP chars, for tkinter use".

If this does not happen in 3.5, I would consider a patch to add a private function to EditorWindow.py to do the same.  It would be far less efficient, but fast enough for short path names.

The EditorWindow.py line numbers are slight different from those in 3.4.3 (and 3.4.2, I believe), so I presume this is with 3.4.0 or 3.4.1.  The result with 3.4.3 should be unchanged.

----------
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23672>
_______________________________________


More information about the Python-bugs-list mailing list