mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #407
This commit is contained in:
parent
e8f76739da
commit
f53fc46c42
@ -366,7 +366,11 @@ class LRFMetaFile(object):
|
|||||||
try:
|
try:
|
||||||
return dom.parseString(src)
|
return dom.parseString(src)
|
||||||
except:
|
except:
|
||||||
return dom.parseString(src.replace('\x00', '').strip())
|
try:
|
||||||
|
return dom.parseString(src.replace('\x00', '').strip())
|
||||||
|
except:
|
||||||
|
src = src.replace('\x00', '').strip().decode('latin1')
|
||||||
|
return dom.parseString(src.encode('utf-8'))
|
||||||
except zlib.error:
|
except zlib.error:
|
||||||
raise LRFException("Unable to decompress document meta information")
|
raise LRFException("Unable to decompress document meta information")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user