[Web-SIG] Clarifications on Python 3.0 and WSGI.
Phillip J. Eby
pje at telecommunity.com
Tue Mar 25 17:35:05 CET 2008
At 11:04 AM 3/25/2008 -0500, Ian Bicking wrote:
>Phillip J. Eby wrote:
>>It says that in versions of Python where 'str is unicode' (i.e.
>>Jython, IronPython, and Python 3000), then the specification should
>>be read to define "string" as a unicode string whose characters can
>>be expressed in latin-1.
>>Really, adding support for bytes is the stretch here. In fact, I'd
>>almost go so far as to say the heck with bytes support except for
>>the response body. I could easily consider headers to be text, instead.
>
>Latin-1? How is this supposed to work at all?
Latin-1 is the encoding that can allow a unicode string to losslessly
encode arbitrary bytes. And that's how these things are handled (or
should be handled, per the spec) in Jython and IronPython today.
In any case I only said I'd *almost* go so far as to say headers are text. :)
More information about the Web-SIG
mailing list