Skip to content

Instantly share code, notes, and snippets.

@myme
Created May 18, 2011 07:28
Show Gist options
  • Save myme/978139 to your computer and use it in GitHub Desktop.
Save myme/978139 to your computer and use it in GitHub Desktop.
UTF8-ify -- Crap
#!/usr/bin/env python
import sys
alpha = {
'a' : u'\u1EA1', 'b' : u'\u1E05', 'c' : u'\u1E09',
'd' : u'\u1E0D', 'e' : u'\u1EB9', 'f' : u'\u1E1F',
'g' : u'\u1E21', 'h' : u'\u1E25', 'i' : u'\u1ECB',
'k' : u'\u1E33', 'l' : u'\u1E37', 'm' : u'\u1E43',
'n' : u'\u1E45', 'o' : u'\u1ECD', 'p' : u'\u1E57',
'r' : u'\u1E5B', 's' : u'\u1E61', 't' : u'\u1E6D',
'u' : u'\u1EE5', 'v' : u'\u1E7F', 'w' : u'\u1E85',
'x' : u'\u1E8B', 'y' : u'\u1E8F', 'z' : u'\u1E93',
}
print ''.join([alpha[c] if c in alpha else c for c in ' '.join([x.decode('utf8') for x in sys.argv[1:]])])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment