character set gobbledy-gook ascii translation ...

Darran Edmundson darran.edmundson at
Fri Dec 24 15:11:16 CET 2004

I'm parsing a file with the mailbox and email modules and
come across subject headers like:

I've looked at the Charset class but can't figure out how to use it to
convert the above strings to a human readable form.  Generally, I 
imagine that
there is no guarantee that an encoded string can be rendered meaningfully
in ASCII - but these are posts to an English language mai list so it should
be possible for this restricted case.

I can guess the translation in the first example above but I'm
hoping there is a Python module that'll do it for me.

Any help is much appreciated.


More information about the Python-list mailing list