Message118089
| 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:33 | vstinner | set | recipients:
+ vstinner |
| 2010年10月07日 01:25:33 | vstinner | set | messageid: <1286414733.34.0.0267403088134.issue10039@psf.upfronthosting.co.za> |
| 2010年10月07日 01:25:31 | vstinner | link | issue10039 messages |
| 2010年10月07日 01:25:30 | vstinner | create |
|