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.

作者 vstinner
收信人 Arfrever, alexis, ezio.melotti, georg.brandl, lemburg, loewis, ned.deily, petri.lehtinen, pitrou, r.david.murray, sdaoden, vstinner
日期 2012-06-05.12:02:57
SpamBayes Score -1.0
Marked as misclassified
Message-id <1338897778.85.0.120887008638.issue6203@psf.upfronthosting.co.za>
In-reply-to
内容
> Either the code is incorrect in 3.1
> or the documentation should be updated.

Leaving LC_CTYPE unchanged (use the "C" locale, which is ASCII in most
cases) at Python startup would be a major change in Python 3. I don't
want to change this. You would see a lot of mojibake in your GUIs and get a lot of ugly surrogate characters in filenames (because of the PEP
393) if we don't set the LC_CTYPE to the user preferred encoding at startup anymore.

Setting the LC_CTYPE to the user preferred encoding is just very
convinient and helps Python to speak to the user though the console,
to the filesystem, to pass arguments on a command line of a
subprocess, etc. For example, you cannot pass non-ASCII characters to
a subprocess, characters written by the user in your GUI, if your
current LC_CTYPE locale is C (ASCII): you get an Unicode encode error.

So it's just a documentation issue: see my attached patch.
历史
日期 用户 动作 参数
2012-06-05 12:02:59vstinner修改recipients: + vstinner, lemburg, loewis, georg.brandl, pitrou, ned.deily, ezio.melotti, Arfrever, r.david.murray, alexis, sdaoden, petri.lehtinen
2012-06-05 12:02:58vstinner修改messageid: <1338897778.85.0.120887008638.issue6203@psf.upfronthosting.co.za>
2012-06-05 12:02:58vstinner链接issue6203 messages
2012-06-05 12:02:57vstinner创建