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, akira, deleted250130, ezio.melotti, lemburg, methane, ncoghlan, r.david.murray, vstinner, yan12125
日期 2016-12-28.02:45:45
SpamBayes Score -1.0
Marked as misclassified
Message-id <1482893148.98.0.10861819916.issue28180@psf.upfronthosting.co.za>
In-reply-to
内容
I've now written this up as a PEP: https://github.com/python/peps/blob/master/pep-0538.txt

The latest attached patch implements the specific design proposed in the PEP. Relative to the last Fedora specific patch, this tweaks the warning message wording slightly, and only emits the library level warning when PYTHONALLOWCLOCALE is set:

======================
$ LANG=C ./python -c "import sys; print(sys.getfilesystemencoding())"
Python detected LC_CTYPE=C, forcing LC_ALL & LANG to C.UTF-8 (set PYTHONALLOWCLOCALE to disable this locale coercion behaviour).
utf-8


======================
$ PYTHONALLOWCLOCALE=1 LANG=C ./python -c "import sys; print(sys.getfilesystemencoding())"
Py_Initialize detected LC_CTYPE=C, which limits Unicode compatibility. Some libraries and operating system interfaces may not work correctly. Set `PYTHONALLOWCLOCALE=1 LC_CTYPE=C` to configure a similar environment when running Python directly.
ascii
历史
日期 用户 动作 参数
2016-12-28 02:45:49ncoghlan修改recipients: + ncoghlan, lemburg, vstinner, ezio.melotti, r.david.murray, methane, akira, deleted250130, yan12125, abarry, Jan Niklas Hasse
2016-12-28 02:45:48ncoghlan修改messageid: <1482893148.98.0.10861819916.issue28180@psf.upfronthosting.co.za>
2016-12-28 02:45:48ncoghlan链接issue28180 messages
2016-12-28 02:45:48ncoghlan创建