[Web-SIG] Request for Comments on upcoming WSGI Changes
Massimo Di Pierro
mdipierro at cs.depaul.edu
Tue Sep 22 15:43:53 CEST 2009
Thank you Armin this makes things clear to me ( a newbie hre).
On Sep 22, 2009, at 3:29 AM, Armin Ronacher wrote:
> - my initial plan was going bytes everywhere. Turns out, on Python 3
> this is nearly impossible to do because the majority of the standard
> library went an unicode path, even where bytes would be more
> appropriate (like cgi.FieldStorage, urllib.parse etc.)
I would have taken the same stand.
> - Graham, Robert (and now me as well) try to get charset guessing for
> URLs going, decide on latin1 for the HTTP headers. latin1 could be
> re-decoded by the application if it really thinks it wanted utf-8
> for instance. (Like cookie headers, only I guess only there)
If wsgi guesses the charset before will the application always be able
to derive the original strings?
> - One idea is enforcing unicode for all Python versions
> - One idea is going unicode for Python 3 and bytestrings for Python 2
For what it matters I prefer the latter option.
More information about the Web-SIG