[Web-SIG] Strings in Jython [Graham's WSGI for py3]
graham.dumpleton at gmail.com
Fri Sep 18 09:19:41 CEST 2009
2009/9/18 Armin Ronacher <armin.ronacher at active-4.com>:
> This is my first reply in a list of replies for Grahams lengthy blog
> post about WSGI 3 . I break it up into multiple separate threads so
> that this can be discussed easier.
>> What should be highlighted is that for Jython, as I understand it at
>> least, when reading from a socket connection it returns a unicode
>> string. That unicode string will only have characters in the range
>> \u0000 through \u00FF, inclusive. Further, it is possible to transcode
>> that unicode string without needing to go through a separate byte
>> string type.
> On Jython 2.5 (the only one I tested) there is a 'str' and 'unicode'
> type and sockets return strings. I can't see much difference to cpython
> Is the Jython unicode issue really (still) relevant?
> I can see that IronPython has only one string type, but they are doing
> fine handling binary data in their unicode? ones.
For the record, I have never used Jython or IronPython so could only
base what I said based on existing information in the PEP and past
discussions in the Google Groups archive about WSGI when the
specification being drafted.
Thus, definitely need people familiar with those Python
implementations to comment on whether what I was saying makes any
sense at all.
More information about the Web-SIG