Additional support for reading UTF-8 encoded Mobipocket books.

This commit is contained in:
Kovid Goyal 2009-01-07 09:04:47 -08:00
commit 625b7f172e

View file

@ -344,7 +344,9 @@ def sizeof_trailing_entry(ptr, psize):
while flags:
if flags & 1:
num += sizeof_trailing_entry(data, size - num)
flags >>= 1
flags >>= 1
if self.book_header.extra_flags & 1:
num += (ord(data[size - num - 1]) & 0x3) + 1
return num
def text_section(self, index):