diff --git a/src/calibre/ebooks/mobi/writer8/skeleton.py b/src/calibre/ebooks/mobi/writer8/skeleton.py index 04555467f3..d369e36b9d 100644 --- a/src/calibre/ebooks/mobi/writer8/skeleton.py +++ b/src/calibre/ebooks/mobi/writer8/skeleton.py @@ -65,7 +65,7 @@ def tostring(raw, **kwargs): if xml_declaration: ans = '\n' + ans return re.sub(r'&#x([0-9A-Fa-f]+);', lambda m:mychr(int(m.group(1), 16)), - ans) + ans).encode('utf-8') class Chunk(object):