[Python-Dev] Proposal: new environment variable PYTHONSTDOUTENCODING

Oleg Broytmann phd at phd.pp.ru
Tue May 20 12:48:23 CEST 2008


On Tue, May 20, 2008 at 10:22:37AM +0200, "Martin v. L?wis" wrote:
> I'd like to propose a new environment variable PYTHONSTDOUTENCODING.
> This is meant to solve various problems that people had with Python
> not detecting their terminal encoding correctly; it would override
> any detection that Python would use for determining the encoding of
> stdout (and stdin - but that's less relevant in 2.x).

   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)?

> 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?

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-Dev mailing list