mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Windows: Fix some MOBI files with non-BMP characters not being processed correctly. Fixes #1898894 [Conversion from epub to mobi en v5.2](https://bugs.launchpad.net/calibre/+bug/1898894)
lxml passes unicode to libxml2 as UCS-4 when non-BMP chars are present, and libxml needs iconv to process UCS4 (god knows why) which was not being built on windows.
This commit is contained in:
parent
5af81d105c
commit
99e86bbe29
@ -246,11 +246,15 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "iconv",
|
"name": "iconv",
|
||||||
"os": "macos, linux",
|
|
||||||
"unix": {
|
"unix": {
|
||||||
"filename": "libiconv-1.16.tar.gz",
|
"filename": "libiconv-1.16.tar.gz",
|
||||||
"hash": "sha256:e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04",
|
"hash": "sha256:e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04",
|
||||||
"urls": ["https://ftp.gnu.org/pub/gnu/libiconv/{filename}"]
|
"urls": ["https://ftp.gnu.org/pub/gnu/libiconv/{filename}"]
|
||||||
|
},
|
||||||
|
"windows": {
|
||||||
|
"filename": "libiconv-for-Windows-1.16.zip",
|
||||||
|
"hash": "sha256:d542e635cad954a62a2b451b5644e855b848398917e93adf46d8da4c9cc88b6d",
|
||||||
|
"urls": ["https://github.com/pffang/libiconv-for-Windows/archive/v1.16.zip"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -124,6 +124,8 @@ class BuildTest(unittest.TestCase):
|
|||||||
raw = b'<a/>'
|
raw = b'<a/>'
|
||||||
root = etree.fromstring(raw, parser=etree.XMLParser(recover=True, no_network=True, resolve_entities=False))
|
root = etree.fromstring(raw, parser=etree.XMLParser(recover=True, no_network=True, resolve_entities=False))
|
||||||
self.assertEqual(etree.tostring(root), raw)
|
self.assertEqual(etree.tostring(root), raw)
|
||||||
|
from lxml import html
|
||||||
|
html.fromstring("<p>\U0001f63a")
|
||||||
|
|
||||||
def test_certgen(self):
|
def test_certgen(self):
|
||||||
from calibre.utils.certgen import create_key_pair
|
from calibre.utils.certgen import create_key_pair
|
||||||
|
Loading…
x
Reference in New Issue
Block a user