Message32631
"Most other string operations work nicely between normal and unicode strings"
Nope. You *always* get errors if you mix Unicode with NON-ASCII data (unless you've messed up the system's default encoding, which is a bad thing to do if you care about portability). Some examples:
>>> chr(128) + u"foo"
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)
>>> u"foo".find(chr(128))
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)
etc. If there's a bug here, it's that you get a TypeError instead of a ValueError subclass. |
|
Date |
User |
Action |
Args |
2007-08-23 14:59:11 | admin | link | issue1772788 messages |
2007-08-23 14:59:11 | admin | create | |
|