Message105804
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2010年05月15日.12:39:03 |
| SpamBayes Score |
8.612479e-06 |
| Marked as misclassified |
No |
| Message-id |
<1273927146.76.0.292282765786.issue8725@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I introduced initfsencoding() in #8610 to ensure that Py_FileSystemEncoding is not more NULL. In the discussion, Marc Lemburg noticed that falling back the UTF-8 on nl_langinfo(CODESET) error is a bad idea: ASCII is better (I agree).
We cannot fall back to ASCII yet because there are two other problems that have to be fixed before that:
- Python3 doesn't support surrogates in module filenames: see #8611
- If Py_FileSystemEncoding is NULL, encoding functions fallback to utf-8 (PyUnicode_GetDefaultEncoding()). #8715 proposes a new PyUnicode_EncodeFSDefault() function to fix this problem
Attached patch is a partial fix for this issue. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年05月15日 12:39:07 | vstinner | set | recipients:
+ vstinner |
| 2010年05月15日 12:39:06 | vstinner | set | messageid: <1273927146.76.0.292282765786.issue8725@psf.upfronthosting.co.za> |
| 2010年05月15日 12:39:05 | vstinner | link | issue8725 messages |
| 2010年05月15日 12:39:04 | vstinner | create |
|