This patch fixes a number of problems for non-English
archives. In particular:
- it normalizes the encoding name (converting to
lower-case, splitting of potential \r characters, and
splitting off potential quotes)
- if the article and the header encoding differ, it tries
to preserve the decoded header as a Unicode string,
instead of immediately falling back to the MIME-encoded
one (if the encoding is not known to Python it will
still fall back)
- if a Unicode string needs to be formatted, it uses
character references for all non-ASCII characters.
This patch fixes a number of problems for non-English
archives. In particular:
- it normalizes the encoding name (converting to
lower-case, splitting of potential \r characters, and
splitting off potential quotes)
- if the article and the header encoding differ, it tries
to preserve the decoded header as a Unicode string,
instead of immediately falling back to the MIME-encoded
one (if the encoding is not known to Python it will
still fall back)
- if a Unicode string needs to be formatted, it uses
character references for all non-ASCII characters.
[http:// sourceforge. net/tracker/ index.php? func=detail& aid=510415& group_id= 103&atid= 300103]