Matt Giuca <[EMAIL PROTECTED]> added the comment: Wow, I read the WSGI spec. That seems very strange that it says "HTTP does not directly support Unicode, and neither does this interface." Clearly HTTP *does* support Unicode, because it allows you to specify an encoding.
I assume then that the ISO-8859-1 characters the WSGI functions receive will be treated as byte values. (That's rather silly; it's just dodging the issue of Unicode rather than supporting it). But in any event, the PEP has spoken, so we stick with Latin-1. With respect to the text/binary stream, I think it would be best if it's a binary stream, and we explicitly convert those str objects (which WSGI says must only contain Latin-1 range characters) into bytes objects (simply treating code points as bytes; in other words calling .encode('latin-1')) and writing them to the binary stream. (Since the WSGI spec is so adamant we deal in bytes). _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3348> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com