[Python-Dev] Python 1.5.2 modules need porting to 2.0 because of unicode - comments please

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Tue, 19 Sep 2000 10:35:29 +0200


martin wrote:

> I've investigated this somewhat, and noticed the cause of the problem.
> The send method of the socket passes the raw memory representation of
> the Unicode object to send(2). On i386, this comes out as UTF-16LE.
...
> I believe this behaviour is a bug, on the grounds of being
> confusing. The same holds for writing a Unicode string to a file in
> binary mode. Again, it should not write out the internal
> representation. Or else, why doesn't file.write(42) work? I want that
> it writes the internal representation in binary :-)
...
> So in essence, I suggest that the Unicode object does not implement
> the buffer interface.

I agree.

</F>