mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4654 (Diacritical characters do not display in OSX notifications)
This commit is contained in:
parent
006bb99446
commit
b41704341f
@ -117,9 +117,12 @@ def prints(*args, **kwargs):
|
||||
try:
|
||||
arg = arg.encode(enc)
|
||||
except UnicodeEncodeError:
|
||||
if not safe_encode:
|
||||
raise
|
||||
arg = repr(arg)
|
||||
try:
|
||||
arg = arg.encode('utf-8')
|
||||
except:
|
||||
if not safe_encode:
|
||||
raise
|
||||
arg = repr(arg)
|
||||
if not isinstance(arg, str):
|
||||
try:
|
||||
arg = str(arg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user