Graham Dumpleton added the comment:

The requirement per PEP 3333 is that the original byte string needs to be 
converted to native string (Unicode) with the ISO-8891-1 encoding. This is to 
ensure that the original bytes are preserved so that the WSGI application, with 
its own knowledge of what encoding the byte string was in, can then properly 
convert it to the correct encoding.

In other words, the WSGI server is not allowed to assume that the original byte 
string was UTF-8, because in practice it may not be and it cannot know what it 
is. The WSGI server must use ISO-8859-1. The WSGI application if it needs it in 
UTF-8, must then convert it back to a byte string using IS0-8859-1 and then 
from there convert it back to a native string as UTF-8.

So if I understand what you are saying, you are suggesting a change which is 
incompatible with PEP 3333.

Please provide a code snippet or patch to show what you are proposing to be 
changed so it can be determined precisely what you are talking about.

----------
nosy: +grahamd

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16679>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to