Message282977
| Author |
lemburg |
| Recipients |
Jan Niklas Hasse, abarry, ezio.melotti, lemburg, methane, ncoghlan, r.david.murray, vstinner |
| Date |
2016年12月12日.10:17:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1481537841.02.0.0649446920941.issue28180@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
If we just restrict this to the file system encoding (and not the whole LANG setting), how about:
* default the file system encoding to 'utf-8' and use the surrogate escape handler as default error handler
* add a PYTHONFSENCODING env var to set the file system encoding to something else (*)
(*) I believe we discussed this at some point already, but don't remember the outcome.
Regarding the questions of defaulting to LANG=C.UTF-8: I think this needs some more thought, since it would also affect many C locale aware functions. To make this work, Python would have to call setlocale() early on in the startup phase to adjust the C lib accordingly. |
|