[Web-SIG] Request for Comments on upcoming WSGI Changes
pje at telecommunity.com
Tue Sep 22 16:38:44 CEST 2009
At 03:22 PM 9/22/2009 +0100, René Dudfield wrote:
>On Tue, Sep 22, 2009 at 3:07 PM, P.J. Eby <pje at telecommunity.com> wrote:
> > At 11:30 AM 9/22/2009 +0100, Alan Kennedy wrote:
> >> I see this as being the same as Graham's suggested approach of a
> >> per-server configurable charset, which is then stored in the WSGI
> >> dictionary, so that applications that have problems, i.e. that detect
> >> mojibake in the unicode SCRIPT_NAME or PATH_INFO, can attempt to undo
> >> the faulty decoding by the server.
> > This puts the burden on the wrong end of the pipe: there are more apps than
> > servers and they would *all* have to check this in order to be sane.
>Except most everyone is using unicode in their apps already through
Great, so only the frameworks need to change, and if we use utf8
surrogateescape, only the applications which need non-utf8 encoding
will need to do anything differently.
That's one factor weighing towards PEP 383, vs. continuing with
latin-1 or going to bytes.
(Frankly, though, I'm getting tired of this handwaving about these
frameworks that use unicode. If they are putting objects of type
'unicode' under WSGI-defined environ keys on Python 2.x, they are
*not WSGI compliant*. And conversely, if they are doing some kind of
conversion already, it's not gonna kill them to do a slightly
different conversion to support the new version of WSGI.)
More information about the Web-SIG