partial fix for bug 2623, writes characters such as æ to file but ebook-viewr/firefox cannot load the image with the character in the file name.

This commit is contained in:
John Schember 2009-06-15 20:54:54 -04:00
parent d5bf14f1d8
commit 6a23f90a11

View File

@ -149,7 +149,7 @@ class EbookIterator(object):
if self.ebook_ext in ('lit', 'mobi', 'prc', 'opf') and cover:
cfile = os.path.join(os.path.dirname(self.spine[0]),
'calibre_iterator_cover.html')
open(cfile, 'wb').write(TITLEPAGE%cover)
open(cfile, 'wb').write(TITLEPAGE%cover.encode('utf-8'))
self.spine[0:0] = [SpineItem(cfile)]
self.delete_on_exit.append(cfile)