diff options
author | Philippe Nunes <philippe.nunes@linux.intel.com> | 2012-07-26 17:57:53 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-07-27 00:23:52 -0500 |
commit | 9f3f5bce6f89045918ae9b7fede66abf0c51d59e (patch) | |
tree | b52a183675aeb9b3977c8df8289b433a4d065b19 /test/monitor-ofono | |
parent | 96093579c6735edeba9cde7aae411ce35bf28a9e (diff) | |
download | ofono-9f3f5bce6f89045918ae9b7fede66abf0c51d59e.tar.bz2 |
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".
Diffstat (limited to 'test/monitor-ofono')
-rwxr-xr-x | test/monitor-ofono | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/monitor-ofono b/test/monitor-ofono index 8570c341..dcc5ff5b 100755 --- a/test/monitor-ofono +++ b/test/monitor-ofono @@ -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:] |