HarfBuzz text shaping engine
http://harfbuzz.github.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
515 B
19 lines
515 B
#!/usr/bin/python |
|
|
|
import sys |
|
|
|
def decode (s): |
|
return '<' + ','.join ("U+%04X" % ord (u) for u in unicode (s, 'utf8')) + '>' |
|
|
|
if __name__ == '__main__': |
|
|
|
if len (sys.argv) == 1 or ('--stdin' in sys.argv and len (sys.argv) != 2): |
|
print "Usage:\n %s UNICODE_STRING...\nor:\n %s --stdin" % (sys.argv[0], sys.argv[0]) |
|
sys.exit (1) |
|
|
|
if '--stdin' in sys.argv: |
|
sys.argv.remove ('--stdin') |
|
for line in sys.stdin.readlines (): |
|
print decode (line) |
|
else: |
|
print ' '.join (decode (x) for x in (sys.argv[1:]))
|
|
|