[Spambayes] Alpha 2 Release?
Richie Hindle
richie at entrian.com
Tue Jan 28 21:41:33 EST 2003
[François]
> UnicodeEncodeError: 'ascii' codec can't encode character '\ue9' in
> position 86: ordinal not in range(128)
This is bizarre. This is expat complaining that you can't have high-bit
characters in ASCII XML, which is quite right, but I replace all those
characters with charrefs on the way in:
>>> def replaceHighCharacters(match):
... return "&#%d;" % ord(match.group(1))
...
>>> re.sub('([\x80-\xff])', replaceHighCharacters, u"a b \xe9 c d")
u'a b é c d'
So what's going on...?
> Yikes! I just swallowed the tine of a plastic fork!
That'll teach you to try to get out of doing the washing up. 8-)
--
Richie Hindle
richie at entrian.com
More information about the Spambayes
mailing list