I think this should be something standard, but I'm having hard finding anything that works.
Given a plain string containing LaTeX accented characters, does anyone know of a python library which can convert the accents to UTF8 ?
I understand that one may put together a large dictionary by hand (a translation table/rule) and simply apply the translation rule on the string. But this is rather a tedious task, and before doing so, I'd much appreciate if someone can point out if there already is a working solution or not.
recodecommandline tool can convert in both directions between UTF-8 and old-style LaTeX encodings (as well as many others). There is a Python interface called python-recode (available via pypi). – Eric Marsden Sep 04 '18 at 20:33