Fix #4654 (Diacritical characters do not display in OSX notifications)

This commit is contained in:
Kovid Goyal 2010-01-24 14:13:05 -07:00
parent 006bb99446
commit b41704341f

View File

@ -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)