[Python-Dev] decoding errors when comparing strings

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Sat, 15 Jul 2000 21:50:55 +0300 (IDT)


On Sat, 15 Jul 2000, Fredrik Lundh wrote:

> paul wrote:
> > As soon as you find a character out of the ASCII range in one of the
> > strings, I think that you should report that the two strings are
> > unequal.
> 
> sounds reasonable -- but how do you flag "unequal" in cmp?  which
> value is "larger" if all that we know is that they're different...

We can say something like "beyond the ASCII range, every unicode character
is larger then any regular 8-bit character", and compare
lexicographically.

--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez