view bin/unidecode @ 5354:e27e3b8f9265

<oren> ` chmod a+x bin/\xce\xbf\xcf\x85\xce\xb5\xce\xbb\xce\xba\xce\xbf\xce\xbc\xce\xb5
author HackBot
date Mon, 04 May 2015 22:59:48 +0000
parents 940c1732e450
children
line wrap: on
line source

#!/usr/bin/env python
import os, sys
import unicodedata
s = u" ".join("[U+{0:04X} {1}]".format(ord(c), unicodedata.name(c, "DUNNO")) for c in " ".join(sys.argv[1:]).decode("utf-8")).encode("utf-8")
if u"DUNNO" in s:
  os.execvp("multicode", ["multicode"] + sys.argv[1:])
else:
  print s