Is there a way to change the default string encoding?
Ron Garret
rNOSPAMon at flownet.com
Tue Aug 21 03:42:45 EDT 2007
In article <fadvvr$ogf$00$1 at news.t-online.com>,
Peter Otten <__peter__ at web.de> 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.
Thanks!
rg
More information about the Python-list
mailing list