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