diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 7481cb31e..0617a1264 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -288,8 +288,14 @@ class RSS(callbacks.Plugin): def _getConverter(self, feed): toText = utils.web.htmlToText if 'encoding' in feed: - return lambda s: toText(s).strip().encode(feed['encoding'], - 'replace') + def conv(s): + # encode() first so there implicit encoding doesn't happen in + # other functions when unicode and bytestring objects are used + # together + s = s.encode(feed['encoding'], 'replace') + s = toText(s).strip() + return s + return conv else: return lambda s: toText(s).strip()