homepage

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 vstinner
Recipients vstinner
Date 2010年10月07日.01:25:27
SpamBayes Score 4.2317982e-11
Marked as misclassified No
Message-id <1286414733.34.0.0267403088134.issue10039@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2010年10月07日 01:25:33vstinnersetrecipients: + vstinner
2010年10月07日 01:25:33vstinnersetmessageid: <1286414733.34.0.0267403088134.issue10039@psf.upfronthosting.co.za>
2010年10月07日 01:25:31vstinnerlinkissue10039 messages
2010年10月07日 01:25:30vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /