mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: Encode titles as UTF-8 in the PalmDoc header as well as the EXTH header, since there are apparently MOBI readers that use the title from the PalmDoc header in preference to the title from the EXTH header.
This commit is contained in:
parent
d9295d53c2
commit
e84310af63
@ -1376,7 +1376,7 @@ class MobiWriter(object):
|
|||||||
self._text_length,
|
self._text_length,
|
||||||
self._text_nrecords-1, RECORD_SIZE, 0, 0)) # 0 - 15 (0x0 - 0xf)
|
self._text_nrecords-1, RECORD_SIZE, 0, 0)) # 0 - 15 (0x0 - 0xf)
|
||||||
uid = random.randint(0, 0xffffffff)
|
uid = random.randint(0, 0xffffffff)
|
||||||
title = str(metadata.title[0])
|
title = unicode(metadata.title[0]).encode('utf-8')
|
||||||
# The MOBI Header
|
# The MOBI Header
|
||||||
|
|
||||||
# 0x0 - 0x3
|
# 0x0 - 0x3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user