mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix subsetting of fonts not working if the text contains non-BMP unicode characters. Fixes #1349856 [Error using "Subset all Fonts"](https://bugs.launchpad.net/calibre/+bug/1349856)
This commit is contained in:
parent
5c249d279b
commit
a799191771
@ -133,7 +133,9 @@ class Page(QWebPage): # {{{
|
||||
return QString(val)
|
||||
|
||||
def _pass_json_value_setter(self, value):
|
||||
self.bridge_value = json.loads(unicode(value))
|
||||
# Qt WebKit in Qt 4.x adds extra null bytes to the end of the string
|
||||
# if the JSON contains non-BMP characters
|
||||
self.bridge_value = json.loads(unicode(value).rstrip('\0'))
|
||||
|
||||
_pass_json_value = pyqtProperty(QString, fget=_pass_json_value_getter,
|
||||
fset=_pass_json_value_setter)
|
||||
|
Loading…
x
Reference in New Issue
Block a user