for special_char in re.findall('(-([\d]+)-)', name):
name = name.replace(special_char[0], chr(int(special_char[1])))
return name
(is python 3 but doesn't differ much to python 2 code) (edited) for special_char in re.findall('(-([\d]+)-)', name):
name = name.replace(special_char[0], unichr(int(special_char[1])))
return name.encode('utf-8')
(edited)