More TOC unicode fixes

This commit is contained in:
Kovid Goyal 2008-05-18 10:00:14 -07:00
parent efc0a61e70
commit 14e62aa99c
2 changed files with 1 additions and 4 deletions

View File

@ -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...')

View File

@ -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)