Python 1.6a2 Unicode bug (was Re: comparing strings and ints)
effbot at telia.com
Mon Apr 17 18:35:21 CEST 2000
Aahz Maruch <aahz at netcom.com> wrote:
> >Python 1.6a2 (#0, Apr 5 2000, 23:56:55)
> >Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>>> u"abc" < ""
> >Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> >ValueError: UTF-8 decoding error: unexpected code byte
> That looks like a bug to me.
as far as I can tell, it's supposed to be a feature.
if you mix 8-bit strings with unicode strings, python 1.6a2
attempts to interpret the 8-bit string as an utf-8 encoded
but yes, I also think it's a bug. but this far, my attempts
to get someone else to fix it has failed. might have to do
it myself... ;-)
More information about the Python-list