diff options
-rwxr-xr-x | wikiquery | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -10,7 +10,10 @@ version = "0.0.2" def display(o): if isinstance(o, list): - print "'%s'" % "', '".join(map(partial(unicode.encode, encoding="utf-8", errors="replace"), o)) + # partially apply the unicode.encode function with appropriate encoding and error handling + encode = partial(unicode.encode, encoding="utf-8", errors="replace") + + print "'%s'" % "', '".join(map(encode, o)) else: print o.encode("utf-8", "replace") |