This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sanad
Recipients kamisky, roger.serwy, sanad, terry.reedy
Date 2015-08-02.08:32:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

This patch fixes the problem of idle not opening when recent file list has filenames outside BMP and the crashing of idle on using filenames with astral characters.

The added benefit is that you can create a file with such chars and save it and access it again from the Recent Files List.

What this patch doesn't fix is :
1. The File Open Dialog displays the filename incorrectly.
2. The File Open Dialog doesn't allows the file with such filename to be opened.
3. When trying the to run the file with such name, it gives an Traceback to Tkinter. The following is the error message :

Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/sanad/devpy/pessoc/cpython/Lib/tkinter/", line 1549, in __call__
    return self.func(*args)
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 124, in run_module_event
    return self._run_module_event(event)
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 145, in _run_module_event
    interp.restart_subprocess(with_cwd=False, filename=code.co_filename)
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 502, in restart_subprocess
    console.write("\n{0} {1} {0}".format(halfbar, tag))
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 1294, in write
    'Non-BMP character not supported in Tk')
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 49-49: Non-BMP character not supported in Tk

Which I guess is another related issue.
Date User Action Args
2015-08-02 08:32:03sanadsetrecipients: + sanad, terry.reedy, roger.serwy, kamisky
2015-08-02 08:32:03sanadsetmessageid: <>
2015-08-02 08:32:03sanadlinkissue23672 messages
2015-08-02 08:32:02sanadcreate