mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
ZIP Output: Fix system encoding being used instead of UTF-8 for html files. See #1499514 (Latin encode error while converting from epub to htmlz)
This commit is contained in:
parent
781c28fe1d
commit
d56d1c8d37
@ -127,6 +127,8 @@ class HTMLOutput(OutputFormatPlugin):
|
||||
toc=html_toc, meta=meta, nextLink=nextLink,
|
||||
tocUrl=tocUrl, cssLink=cssLink,
|
||||
firstContentPageLink=nextLink)
|
||||
if isinstance(t, unicode):
|
||||
t = t.encode('utf-8')
|
||||
f.write(t)
|
||||
|
||||
with CurrentDir(output_dir):
|
||||
|
@ -84,4 +84,4 @@ class Templite(object):
|
||||
|
||||
def write(self, *args):
|
||||
for a in args:
|
||||
self.__output.append(str(a))
|
||||
self.__output.append(unicode(a))
|
||||
|
Loading…
x
Reference in New Issue
Block a user