Trouble with unicode
charlie at begeistert.org
Mon May 14 22:14:19 CEST 2001
I'm having trouble convert the contents of e-mails stored as unicode
files into plain text. I'm not sure if I've understood how to deal with
As usual the problem is with non-ascii characters.
For example I have the following characters in the mail:
"ä, Ä, ö, Ö, ü, Ü, ß"
when I read the mail in Python as a string I get:
"\xe4, \xc4, \xf6, \xd6, \xfc, \xdc, \xdf"
I've followed the example from
but don't seem to be getting very far and ascii_decode() gives me the
"UnicodeError: ASCII decoding error: ordinal not in range(128)"
Please help me "get it" with unicode.
More information about the Python-list