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 a.badger
Recipients a.badger
Date 2008-10-01.07:17:19
SpamBayes Score 5.004631e-10
Marked as misclassified No
Message-id <>
On a Linux system with a locale setting whose encoding is utf-8, if you
set an environment variable to have a non-utf-8 chanacter, that
environment variable silently does not appear in os.environ::

mkdir ñ
convmv -f utf-8 -t latin-1 --notest ñ
for i in * ; do export PATH=$PATH:$i ; done
echo $PATH
Python 3.0rc1 (r30rc1:66499, Sep 28 2008, 08:21:09) 
[GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['PATH']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.0/", line 389, in __getitem__
KeyError: 'PATH'

I'm uncertain of the impact of this.  It was brought up in a discussion
of sending non-ASCii data to a CGI-WSGI script where the data would be
transferred via os.environ.
Date User Action Args
2008-10-01 07:17:21a.badgersetrecipients: + a.badger
2008-10-01 07:17:21a.badgersetmessageid: <>
2008-10-01 07:17:20a.badgerlinkissue4006 messages
2008-10-01 07:17:19a.badgercreate