mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
If missing encoding information due to missing feed detail, just skip parsing.
This commit is contained in:
parent
7dedeaaa6c
commit
298b79d9b3
1 changed files with 1 additions and 1 deletions
|
@ -3740,7 +3740,7 @@ def convert_to_utf8(http_headers, data):
|
|||
chardet_encoding = None
|
||||
tried_encodings = []
|
||||
if chardet and data:
|
||||
chardet_encoding = unicode(chardet.detect(data)['encoding'], 'ascii', 'ignore')
|
||||
chardet_encoding = unicode(chardet.detect(data)['encoding'] or "", 'ascii', 'ignore')
|
||||
# try: HTTP encoding, declared XML encoding, encoding sniffed from BOM
|
||||
for proposed_encoding in (rfc3023_encoding, xml_encoding, bom_encoding,
|
||||
chardet_encoding, u'utf-8', u'windows-1252', u'iso-8859-2'):
|
||||
|
|
Loading…
Add table
Reference in a new issue