Author grahamd
Recipients claudep, grahamd
Date 2012-12-14.08:42:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1355474559.23.0.860505610303.issue16679@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-12-14 08:42:39grahamdsetrecipients: + grahamd, claudep
2012-12-14 08:42:39grahamdsetmessageid: <1355474559.23.0.860505610303.issue16679@psf.upfronthosting.co.za>
2012-12-14 08:42:39grahamdlinkissue16679 messages
2012-12-14 08:42:38grahamdcreate