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.

Author vstinner
Recipients Arfrever, alexis, ezio.melotti, georg.brandl, lemburg, loewis, ned.deily, petri.lehtinen, pitrou, r.david.murray, sdaoden, vstinner
Date 2012-06-05.12:02:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338897778.85.0.120887008638.issue6203@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2012-06-05 12:02:59vstinnersetrecipients: + vstinner, lemburg, loewis, georg.brandl, pitrou, ned.deily, ezio.melotti, Arfrever, r.david.murray, alexis, sdaoden, petri.lehtinen
2012-06-05 12:02:58vstinnersetmessageid: <1338897778.85.0.120887008638.issue6203@psf.upfronthosting.co.za>
2012-06-05 12:02:58vstinnerlinkissue6203 messages
2012-06-05 12:02:57vstinnercreate