[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-12-04 Thread Adam Olsen
Changes by Adam Olsen [EMAIL PROTECTED]: -- nosy: +Rhamphoryncus ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4006 ___ ___ Python-bugs-list mailing

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-24 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: @a.badger: The behaviour (drop non encodable strings) is not really a problem if you configure correctly your program and computer. Eg. you spoke about CGI-WSGI: if your website also speak UTF-8, you will be able to read all environment

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-24 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: The bug tracker is maybe not the right place to discuss a new Python3 feature. 1) return mixed unicode and byte types in os.environ One goal of Python3 was to avoid mixing bytes and characters (bytes/str). 2) return only byte types in

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-24 Thread Toshio Kuratomi
Toshio Kuratomi [EMAIL PROTECTED] added the comment: ''' @a.badger: The behaviour (drop non encodable strings) is not really a problem if you configure correctly your program and computer. Eg. you spoke about CGI-WSGI: if your website also speak UTF-8, you will be able to read all environment

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-24 Thread Toshio Kuratomi
Toshio Kuratomi [EMAIL PROTECTED] added the comment: The bug tracker is maybe not the right place to discuss a new Python3 feature. It's a bug! But if you guys want it to be a feature, then what mailing list do I need to join? Is there one devoted to Unicode or is python-dev where I need to

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: -- resolution: - wont fix status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4006 ___

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi [EMAIL PROTECTED] added the comment: Pardon, but when you close something as wontfix it's polite to say why. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4006 ___

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Pardon, but when you close something as wontfix it's polite to say why. Can you propose a reasonable way to fix this? People have thought hard, and many days, and nobody could propose a reasonable fix. As 3.0 is going to be released soon,

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi [EMAIL PROTECTED] added the comment: Is it a bug? If so, then it should be retargetted to 3.1 instead of closed wontfix. If it's not a bug then there should be an explanation of why it's not a bug. As for fixing it there are several inelegant methods that are better than

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Is it a bug? It's not a bug; see my original reply. This case is just not supported. It may be supported in future versions, but (if it was for me) not without a PEP first. ___ Python tracker [EMAIL

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi [EMAIL PROTECTED] added the comment: I'm sorry but For the moment, this case is just not supported. is not an explanation of why this is not a bug. It is a statement that the interpreter cannot handle a situation that has arisen. If you said, We don't believe that any computer

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Toshio Kuratomi wrote: So what's the reason this is not a bug? It's a bug only if the implementation deviates from the specification. In this case, it does not. The behavior is intentional: python deliberately drops environment variables it

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-14 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: See also issue #4126 which is the opposite :-) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4006 ___ ___

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-02 Thread Toshio Kuratomi
Toshio Kuratomi [EMAIL PROTECTED] added the comment: It's not a feature it's a bug! :-) (I hope you meant to have a smiley too ;-) As stated in the os.listdir() related bug, on Unix filesystems filenames are a sequence of bytes. The system encoding allows the user-level tools to display the

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-02 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: @a.badger: Again, dropping invalid filenames in listdir() is a (very recent) choice of the Python3 design. Please read this document which explain the current situation of bytes vs unicode:

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-01 Thread Toshio Kuratomi
New submission from Toshio Kuratomi [EMAIL PROTECTED]: 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

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-01 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: For the moment, this case is just not supported. -- nosy: +loewis versions: +Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4006 ___

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-01 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: It's not a bug, it's a feature! Python3 rejects invalid byte sequence (according to the default system encoding) from the command line or environment variables. listdir(str) will also drop invalid filenames. Yes, we need a PEP (a FAQ) about