mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix unicode error when reporting save to disk errors on some windows systems
This commit is contained in:
parent
23c7f1b2c7
commit
ee50b9a9d6
@ -13,7 +13,7 @@ from Queue import Empty
|
|||||||
|
|
||||||
from PyQt5.Qt import QObject, Qt, pyqtSignal
|
from PyQt5.Qt import QObject, Qt, pyqtSignal
|
||||||
|
|
||||||
from calibre import prints
|
from calibre import prints, force_unicode
|
||||||
from calibre.constants import DEBUG
|
from calibre.constants import DEBUG
|
||||||
from calibre.customize.ui import can_set_metadata
|
from calibre.customize.ui import can_set_metadata
|
||||||
from calibre.db.errors import NoSuchFormat
|
from calibre.db.errors import NoSuchFormat
|
||||||
@ -330,6 +330,7 @@ class Saver(QObject):
|
|||||||
a = report.append
|
a = report.append
|
||||||
|
|
||||||
def indent(text):
|
def indent(text):
|
||||||
|
text = force_unicode(text)
|
||||||
return '\xa0\xa0\xa0\xa0' + '\n\xa0\xa0\xa0\xa0'.join(text.splitlines())
|
return '\xa0\xa0\xa0\xa0' + '\n\xa0\xa0\xa0\xa0'.join(text.splitlines())
|
||||||
|
|
||||||
for book_id, errors in self.errors.iteritems():
|
for book_id, errors in self.errors.iteritems():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user