STINNER Victor <victor.stin...@haypocalc.com> added the comment: > Can somebody please explain what problem is being solved with this patch?
The problem is that we don't have reliable algorithm to get the encoding of each environment variable. We cannot ensure that all variables are encoded "correctly". Using os.getenvb(), you can decode the string using the right encoding (which may be different for each variable). Marc proposed os.getenv(key, encoding=...) but I don't like this solution: you have to split correctly all unicode things and all bytes things. You should have the choice to keep environment unchanged, as byte strings, and manipulate only byte strings, or to use the classic API (unicode only, os.getenv, os.environ(), ....). os.environb and os.getenvb() will be required to applications in real world application supporting all applications and misconfigured environments. Python3 shouldn't try to fix misconfigured systems but leave this problem to the developer. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8603> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com