This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, ezio.melotti, gregory.p.smith, lemburg, loewis, pitrou, vstinner
Date 2010-05-03.22:20:47
SpamBayes Score 0.00093924697
Marked as misclassified No
Message-id <>
> 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.
Date User Action Args
2010-05-03 22:20:49vstinnersetrecipients: + vstinner, lemburg, loewis, gregory.p.smith, pitrou, ezio.melotti, Arfrever
2010-05-03 22:20:49vstinnersetmessageid: <>
2010-05-03 22:20:48vstinnerlinkissue8603 messages
2010-05-03 22:20:47vstinnercreate