diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index b2fb31b7b..bf871b11f 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -262,8 +262,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()