def latin_to_vcg(st):
 for char in st:
  if (char not in string.ascii_letters):
   try:
    num = ord(char)
    if (num >= 192):
     st = st.replace(char, ('\\fi%d' % ord(char)))
   except:
    pass
 return st

def latin_to_vcg ( st ) : for char in st : if ( char not in string . ascii_letters ) : try : num = ord ( char ) if ( num >= 192 ) : st = st . replace ( char , ( '\\fi%d' % ord ( char ) ) ) except : pass return st
convert latin characters using vcg escape sequence .