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 serhiy.storchaka
Recipients kamisky, python-dev, roger.serwy, sanad, serhiy.storchaka, terry.reedy
Date 2015-08-07.13:53:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438955604.22.0.720064446028.issue23672@psf.upfronthosting.co.za>
In-reply-to
Content
Interesting, this doesn't work with non-UTF-8 locale.

$ touch astral𝔼.py
$ LC_ALL=en_US.iso88591 ./python -m idlelib.idle -e astral𝔼.py
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/serhiy/py/cpython/Lib/idlelib/idle.py", line 11, in <module>
    idlelib.PyShell.main()
  File "/home/serhiy/py/cpython/Lib/idlelib/PyShell.py", line 1553, in main
    if flist.open(filename) is None:
  File "/home/serhiy/py/cpython/Lib/idlelib/FileList.py", line 36, in open
    edit = self.EditorWindow(self, filename, key)
  File "/home/serhiy/py/cpython/Lib/idlelib/PyShell.py", line 123, in __init__
    EditorWindow.__init__(self, *args)
  File "/home/serhiy/py/cpython/Lib/idlelib/EditorWindow.py", line 288, in __init__
    if io.loadfile(filename):
  File "/home/serhiy/py/cpython/Lib/idlelib/IOBinding.py", line 244, in loadfile
    self.updaterecentfileslist(filename)
  File "/home/serhiy/py/cpython/Lib/idlelib/IOBinding.py", line 525, in updaterecentfileslist
    self.editwin.update_recent_files_list(filename)
  File "/home/serhiy/py/cpython/Lib/idlelib/EditorWindow.py", line 899, in update_recent_files_list
    if '\0' in path or not os.path.exists(path[0:-1]):
  File "/home/serhiy/py/cpython/Lib/genericpath.py", line 19, in exists
    os.stat(path)
UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001d53c' in position 22: ordinal not in range(256)
History
Date User Action Args
2015-08-07 13:53:24serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, roger.serwy, python-dev, kamisky, sanad
2015-08-07 13:53:24serhiy.storchakasetmessageid: <1438955604.22.0.720064446028.issue23672@psf.upfronthosting.co.za>
2015-08-07 13:53:24serhiy.storchakalinkissue23672 messages
2015-08-07 13:53:22serhiy.storchakacreate