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.

作者 ncoghlan
收信人 Jan Niklas Hasse, abarry, ezio.melotti, methane, ncoghlan, r.david.murray, vstinner
日期 2016-12-12.05:26:54
SpamBayes Score -1.0
Marked as misclassified
Message-id <1481520415.25.0.991854549409.issue28180@psf.upfronthosting.co.za>
In-reply-to
内容
I think we're genuinely getting to the point now where the majority of "LANG=C" cases are misconfigurations rather than intended behaviour. We're also to the point where:

- on Mac OS X, binary system interfaces have been handled as UTF-8 by default since 3.0
- on Windows, as of 3.6, the OS native binary system interfaces are now bypassed entirely in favour of transcoding from UTF-8 to UTF-16-LE 

So I think for Python 3.7 it makes sense to do the following on other *nix systems:

- very early in CPython startup (even before argument processing), if the detected locale is "C", force it to "C.UTF-8" if possible, and print a warning either way
- add a PYTHONKEEPASCIILOCALE environment variable to turn that behaviour off

I do think we actually want to *change* the C level locale in the process though, as otherwise we can expect to see weird interactions where CPython and extension modules disagree about the default text encoding.
历史
日期 用户 动作 参数
2016-12-12 05:26:55ncoghlan修改recipients: + ncoghlan, vstinner, ezio.melotti, r.david.murray, methane, abarry, Jan Niklas Hasse
2016-12-12 05:26:55ncoghlan修改messageid: <1481520415.25.0.991854549409.issue28180@psf.upfronthosting.co.za>
2016-12-12 05:26:55ncoghlan链接issue28180 messages
2016-12-12 05:26:54ncoghlan创建