mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -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:
|
try:
|
||||||
arg = arg.encode(enc)
|
arg = arg.encode(enc)
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
if not safe_encode:
|
try:
|
||||||
raise
|
arg = arg.encode('utf-8')
|
||||||
arg = repr(arg)
|
except:
|
||||||
|
if not safe_encode:
|
||||||
|
raise
|
||||||
|
arg = repr(arg)
|
||||||
if not isinstance(arg, str):
|
if not isinstance(arg, str):
|
||||||
try:
|
try:
|
||||||
arg = str(arg)
|
arg = str(arg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user