Merge branch 'no-prefered-xml-parser'
[rss2email.git] / rss2email / feed.py
index 41ede76cbd787b2bd57457545c3b7ce7c9275145..164369dea6334b72543f081e504eb9dfb53fe765 100644 (file)
@@ -408,6 +408,11 @@ class Feed (object):
         elif isinstance(exc, _sax.SAXParseException):
             _LOG.error('sax parsing error: {}: {}'.format(exc, self))
             warned = True
+        elif (parsed.bozo and
+              isinstance(exc, _feedparser.CharacterEncodingOverride)):
+            _LOG.warning(
+                'incorrectly declared encoding: {}: {}'.format(exc, self))
+            warned = True
         elif parsed.bozo or exc:
             if exc is None:
                 exc = "can't process"