[Python-Dev] Proposal: new environment variable PYTHONSTDOUTENCODING (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Tue May 20 22:22:03 CEST 2008
- Previous message: [Python-Dev] Proposal: new environment variable PYTHONSTDOUTENCODING
- Next message: [Python-Dev] Proposal: new environment variable PYTHONSTDOUTENCODING
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is it to override locale settings in case the user wants a different encoding? for such cases as redirected stdout, or windows console (which has an "OEM" encoding that differs from the locale encoding)?
On Windows, the setlocale mechanism isn't used at all, since it doesn't support nl_langinfo (let alone CODESET).
And yes, that is to override whatever determination Python would make on its own.
Naming contest: it probably would be the longest of the PYTHON* variables. I would not want to call it PYTHONENCODING, or PYTHONSTDENCODING, though, because people might infer that it affects sys.getdefaultencoding(), which it shouldn't. PYTHONIOENCODING?
Unprecise in a different way (as it is meant to apply only to stdout, not to all IO), but shorter.
Regards, Martin
- Previous message: [Python-Dev] Proposal: new environment variable PYTHONSTDOUTENCODING
- Next message: [Python-Dev] Proposal: new environment variable PYTHONSTDOUTENCODING
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]