From: Brett Parker Date: Tue, 17 Mar 2009 12:08:18 +0000 (+0000) Subject: Small fix to title handling code to deal with unicode better X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/commitdiff_plain/a53f1589ffaa52371e9eed15ff1a6ffd54997d89 Small fix to title handling code to deal with unicode better --- diff --git a/rss2maildir.py b/rss2maildir.py index b77c6d7..563da50 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -739,10 +739,10 @@ def parse_and_deliver(maildir, url, statedir): pass msg.add_header("Date", createddate) subj_gen = HTML2Text() - title = item["title"].encode("utf-8") + title = item["title"] title = re.sub(u'<', u'<', title) title = re.sub(u'>', u'>', title) - subj_gen.feed(title) + subj_gen.feed(title.encode("utf-8")) msg.add_header("Subject", subj_gen.gettext()) msg.set_default_type("text/plain")