From a53f1589ffaa52371e9eed15ff1a6ffd54997d89 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Tue, 17 Mar 2009 12:08:18 +0000 Subject: [PATCH] Small fix to title handling code to deal with unicode better --- rss2maildir.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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") -- 2.39.5