mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #1981 (Problems whit unicone titles)
This commit is contained in:
parent
750461e3ba
commit
d7c1af9b99
@ -126,6 +126,8 @@ class BookHeader(object):
|
|||||||
|
|
||||||
self.exth_flag, = struct.unpack('>L', raw[0x80:0x84])
|
self.exth_flag, = struct.unpack('>L', raw[0x80:0x84])
|
||||||
self.exth = None
|
self.exth = None
|
||||||
|
if not isinstance(self.title, unicode):
|
||||||
|
self.title = self.title.decode(self.codec, 'replace')
|
||||||
if self.exth_flag & 0x40:
|
if self.exth_flag & 0x40:
|
||||||
self.exth = EXTHHeader(raw[16+self.length:], self.codec, self.title)
|
self.exth = EXTHHeader(raw[16+self.length:], self.codec, self.title)
|
||||||
self.exth.mi.uid = self.unique_id
|
self.exth.mi.uid = self.unique_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user