From 6a23f90a11b8e0b34cb62568655fb9e8234fad79 Mon Sep 17 00:00:00 2001 From: John Schember Date: Mon, 15 Jun 2009 20:54:54 -0400 Subject: [PATCH] =?UTF-8?q?partial=20fix=20for=20bug=202623,=20writes=20ch?= =?UTF-8?q?aracters=20such=20as=20=C3=A6=20to=20file=20but=20ebook-viewr/f?= =?UTF-8?q?irefox=20cannot=20load=20the=20image=20with=20the=20character?= =?UTF-8?q?=20in=20the=20file=20name.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/calibre/ebooks/oeb/iterator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/iterator.py b/src/calibre/ebooks/oeb/iterator.py index f4eb2c5a29..4fc7b7ea1b 100644 --- a/src/calibre/ebooks/oeb/iterator.py +++ b/src/calibre/ebooks/oeb/iterator.py @@ -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)