> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com