mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix Bug #3338: Handle strange characters in eReader metadata title.
This commit is contained in:
parent
5589a06447
commit
813d9eb14f
@ -105,7 +105,7 @@ class Reader132(FormatReader):
|
||||
if not os.path.exists(output_dir):
|
||||
os.makedirs(output_dir)
|
||||
|
||||
html = u'<html><head><title>%s</title></head><body>' % self.mi.title
|
||||
html = u'<html><head><title>%s</title></head><body>' % self.mi.title.decode('utf-8', 'replace')
|
||||
|
||||
pml = u''
|
||||
for i in range(1, self.header_record.num_text_pages + 1):
|
||||
|
@ -93,7 +93,7 @@ class Reader202(FormatReader):
|
||||
pml += self.get_text_page(i)
|
||||
|
||||
html = u'<html><head><title>%s</title></head><body>%s</body></html>' % \
|
||||
(self.mi.title, pml_to_html(pml))
|
||||
(self.mi.title.decode('utf-8', 'replace'), pml_to_html(pml))
|
||||
|
||||
with CurrentDir(output_dir):
|
||||
with open('index.html', 'wb') as index:
|
||||
|
Loading…
x
Reference in New Issue
Block a user