mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'patch-1' of https://github.com/wm75/calibre
This commit is contained in:
commit
92c412996f
@ -115,7 +115,7 @@ class HTMLFile(object):
|
|||||||
encoding = detect_xml_encoding(src)[1]
|
encoding = detect_xml_encoding(src)[1]
|
||||||
if encoding:
|
if encoding:
|
||||||
try:
|
try:
|
||||||
header = header.decode(encoding)
|
header = header.decode(encoding, errors='ignore')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
self.is_binary = level > 0 and not bool(self.HTML_PAT.search(header))
|
self.is_binary = level > 0 and not bool(self.HTML_PAT.search(header))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user