monitor-ofono: Fix to print non-English characters

The default encoding for a Python bytestring is ASCII. But the
SMS/USSD text is encoded in UTF-8.
This is why trying to convert non-English characters (Unicode
characters beyond 128) produces the error
"UnicodeEncodeError: 'ascii' codec can't encode character".
This commit is contained in:
Philippe Nunes 2012-07-26 17:57:53 +02:00 committed by Denis Kenzior
parent 96093579c6
commit 9f3f5bce6f
1 changed files with 2 additions and 2 deletions

View File

@ -69,11 +69,11 @@ def event(member, path, interface):
def message(msg, args, member, path, interface):
iface = interface[interface.rfind(".") + 1:]
print "{%s} [%s] %s %s (%s)" % (iface, path, member,
str(msg), pretty(args))
msg, pretty(args))
def ussd(msg, member, path, interface):
iface = interface[interface.rfind(".") + 1:]
print "{%s} [%s] %s %s" % (iface, path, member, str(msg))
print "{%s} [%s] %s %s" % (iface, path, member, msg)
def value(value, member, path, interface):
iface = interface[interface.rfind(".") + 1:]