On Tue, May 20, 2008 at 12:48 PM, Oleg Broytmann <phd@phd.pp.ru> wrote:
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?


What about PYTHONLANG ?

or something that tries to reflect which environment variables are used for this ?

(LC_CTYPE -> PYTHONCTYPE ?  if the code uses just LC_CTYPE)

http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html#tag_08_02

Just for my own knowledge: why it has to be one word ? can't it be PYTHON_LANG ?

Tarek

 

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



--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/