Skip to content

Instantly share code, notes, and snippets.

@alertor
Created February 27, 2013 19:44
Show Gist options
  • Save alertor/5051038 to your computer and use it in GitHub Desktop.
Save alertor/5051038 to your computer and use it in GitHub Desktop.
"convert" romanian diacritics
#!/usr/bin/env python2.6
# -*- coding: utf-8 -*-
# get hex code from : http://webdesign.about.com/od/localization/l/blhtmlcodes-ro.htm
import fileinput
table = {
0x103: u'a',
0x15f: u's',
}
for line in fileinput.input():
s = line.decode('utf8')
print s.translate(table),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment