Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env python
import sys
for x in sys.stdin:
t = x.rstrip().split("\t")
if len(t) != 2:
print x,
ch = t[0].decode('utf8')
if len(ch) != 1:
print "ERROR: %s" % x,
code = ord(ch)
ext = ''
if code >= 0x3400 and code <= 0x4DBF:
ext = '{A}'
elif code >= 0x20000 and code <= 0x2A6DF:
ext = '{B}'
elif code >= 0x2A700 and code <= 0x2B73F:
ext = '{C}'
elif code >= 0x2B740 and code <= 0x2B81F:
ext = '{D}'
print t[0] + "\t" + ext + t[1]

This comment has been minimized.

Copy link

LEOYoon-Tsaw commented May 19, 2013


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.