Ron Garret wrote: > In article <[EMAIL PROTECTED]>, > Peter Otten <[EMAIL PROTECTED]> wrote: > >> If all else fails there's >> >> >>> sys.setdefaultencoding("latin1") >> >>> "Andre\xe9 Ramel".decode() >> u'Andre\xe9 Ramel' >> >> but that's an evil hack, you should rather talk to the maintainer of the >> offending code to update it to accept unicode. > > Yes, but I need to hack around it until I can get it fixed.
Oops, the snippet above omits the actual hack. It should be >>> import sys >>> reload(sys) <module 'sys' (built-in)> >>> sys.setdefaultencoding("latin1") >>> "Andre\xe9 Ramel".decode() u'Andre\xe9 Ramel' Peter -- http://mail.python.org/mailman/listinfo/python-list