Message162340
> 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. |
|
Date |
User |
Action |
Args |
2012-06-05 12:02:59 | vstinner | set | recipients:
+ vstinner, lemburg, loewis, georg.brandl, pitrou, ned.deily, ezio.melotti, Arfrever, r.david.murray, alexis, sdaoden, petri.lehtinen |
2012-06-05 12:02:58 | vstinner | set | messageid: <1338897778.85.0.120887008638.issue6203@psf.upfronthosting.co.za> |
2012-06-05 12:02:58 | vstinner | link | issue6203 messages |
2012-06-05 12:02:57 | vstinner | create | |
|