➜

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.

作者 vstinner
收信人 vstinner
日期 2010-10-07.01:25:27
SpamBayes Score 4.2317982e-11
Marked as misclassified 否
Message-id <1286414733.34.0.0267403088134.issue10039@psf.upfronthosting.co.za>
In-reply-to
内容
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().
历史
日期 用户 动作 参数
2010-10-07 01:25:33vstinner修改recipients: + vstinner
2010-10-07 01:25:33vstinner修改messageid: <1286414733.34.0.0267403088134.issue10039@psf.upfronthosting.co.za>
2010-10-07 01:25:31vstinner链接issue10039 messages
2010-10-07 01:25:30vstinner创建