diff --git a/xclib/utf8.py b/xclib/utf8.py index d1e3914..911cc64 100644 --- a/xclib/utf8.py +++ b/xclib/utf8.py @@ -16,8 +16,11 @@ def unutf8(u, opts='strict'): traceback.print_exc() return 'illegal-utf8-sequence-' + dec else: - return u.decode('utf-8', opts) - + try: + return u.decode('utf-8', opts) + except AttributeError: + pass + def utf8l(l): '''Encode a copy of the list, converted to UTF-8''' return list(map(utf8, l))