mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-05 05:45:33 +01:00
GwR revert mobi writer for utf-8, breaks indexing
This commit is contained in:
parent
cee9c6e6db
commit
11ad2a2ecf
1 changed files with 7 additions and 6 deletions
|
|
@ -1795,12 +1795,13 @@ def _generate_index(self):
|
|||
self._oeb.log.debug('Index records dumped to', t)
|
||||
|
||||
def _clean_text_value(self, text):
|
||||
if not text:
|
||||
text = u'(none)'
|
||||
text = text.strip()
|
||||
if not isinstance(text, unicode):
|
||||
text = text.decode('utf-8', 'replace')
|
||||
text = text.encode('ascii','replace')
|
||||
if text is not None and text.strip() :
|
||||
text = text.strip()
|
||||
if not isinstance(text, unicode):
|
||||
text = text.decode('utf-8', 'replace')
|
||||
text = text.encode('utf-8')
|
||||
else :
|
||||
text = "(none)".encode('utf-8')
|
||||
return text
|
||||
|
||||
def _add_to_ctoc(self, ctoc_str, record_offset):
|
||||
|
|
|
|||
Loading…
Reference in a new issue