[Web-SIG] Request for Comments on upcoming WSGI Changes

Armin Ronacher armin.ronacher at active-4.com
Mon Sep 21 15:21:32 CEST 2009


Hi,

And Clover schrieb:
> Seems like a mistake. If the middleware knows iso-8859-7 is in use, it 
> would need to transcode the charset regardless of whether the 
> initially-submitted bytes were a valid UTF-8 sequence or not. Otherwise 
> the application would break when fed with eg. Greek words that happened 
> to encode to valid UTF-8 bytes.
The middleware can never know.  WSGI will demand UTF-8 URLs and only
provide iso-XXX support for backwards compatibility.

> will fail, as the given UTF-8 sniffer only looks at the path part to 
> determine what encoding to use for both of the path part and the query 
> string. I don't think WSGI should mandate any particular decoding of the 
> QUERY_STRING.
That is indeed a limitation in the specification.  That's something we
have to think about.  Good catch.


Regards,
Armin


More information about the Web-SIG mailing list