On Jan 30, 11:28 pm, Walter Dörwald <[EMAIL PROTECTED]> wrote:
>
> codecs.register_error("transliterate", transliterate)
>
> Walter
Really, really slick solution.
Though, why was it [:1], not [0]? ;-)
And one more thing:
> def transliterate(exc):
> if not isinstance(exc, UnicodeEncodeError):
> raise TypeError("don'ty know how to handle %r" % r)
I don't understand what %r and r are and where they are from. The man
3 printf page doesn't have %r formatting.
Thanks for the tip.
Hieu
--
http://mail.python.org/mailman/listinfo/python-list