New submission from STINNER Victor <victor.stin...@haypocalc.com>: If a program name contains a non-ascii character in its name and/or full path and PYTHONFSENCODING is set to an encoding different than the locale encoding, Python fails to open the program.
Example in the utf-8 locale: $ PYTHONFSENCODING=ascii ./python é.py UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 0: ordinal not in range(128) This issue is similar to #9992 and #10014. Solutions: remove PYTHONFSENCODING environment variable or redecode the filename from the locale encoding to the filesystem encoding. Attached patch implements the latter. -- We may also redecode Py_GetProgramName(). ---------- components: Interpreter Core, Unicode files: redecode_filename.patch keywords: patch messages: 118089 nosy: haypo priority: normal severity: normal status: open title: python é.py fails with UnicodeEncodeError if PYTHONFSENCODING is used versions: Python 3.2 Added file: http://bugs.python.org/file19143/redecode_filename.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10039> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com