mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More TOC unicode fixes
This commit is contained in:
parent
efc0a61e70
commit
14e62aa99c
@ -287,8 +287,7 @@ class HTMLConverter(object, LoggingInterface):
|
||||
self.book.append(self.current_page)
|
||||
|
||||
for text, tb in self.extra_toc_entries:
|
||||
ascii_text = text.encode('ascii', 'ignore')
|
||||
self.book.addTocEntry(ascii_text, tb)
|
||||
self.book.addTocEntry(text, tb)
|
||||
|
||||
if self.base_font_size > 0:
|
||||
self.log_info('\tRationalizing font sizes...')
|
||||
|
@ -96,9 +96,7 @@ class TOC(list):
|
||||
|
||||
def read_ncx_toc(self, toc):
|
||||
self.base_path = os.path.dirname(toc)
|
||||
print xml_to_unicode(open(toc, 'rb').read(), True)[1]
|
||||
soup = NCXSoup(xml_to_unicode(open(toc, 'rb').read())[0])
|
||||
print unicode(soup).encode('utf8')
|
||||
|
||||
def process_navpoint(np, dest):
|
||||
play_order = np.get('playOrder', 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user