1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

decode: hide meaningless \x style transcription

This commit is contained in:
urlbot
2015-07-07 00:32:05 +02:00
parent 60568f904b
commit 35ebecfa6e

View File

@@ -482,14 +482,19 @@ def command_decode(argv, **args):
char_esc = str(char.encode('unicode_escape'))[3:-1]
if 0 == len(char_esc):
char_esc = ''
else:
char_esc = ' (%s)' % char_esc
try:
uni_name = unicodedata.name(char)
except Exception as e:
log.plugin('decode(%s) failed: %s' % (char, e))
out.append("can't decode %s (%s): %s" % (char, char_esc, e))
out.append("can't decode %s%s: %s" % (char, char_esc, e))
continue
out.append('%s (%s) is called "%s"' % (char, char_esc, uni_name))
out.append('%s%s is called "%s"' % (char, char_esc, uni_name))
if 1 == len(out):
return {