A reintroduction to XML with an emphasis on character encoding...has things to say about encoding that you almost certainly either don't know at all, or haven't yet fully grasped.
latex.py Character translation utilities for LaTeX-formatted text. Usage: - unicode(string,'latex') - ustring.decode('latex') are both available just by letting "import latex" find this file. - unicode(string,'latex+latin1') - ustring.decode('latex+latin1') where latin1 can be replaced by any other known encoding, also become available by calling latex.register(). We also make public a dictionary latex_equivalents, mapping ord(unicode char) to LaTeX code. D. Eppstein, October 2003. source: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252124 License: Python license (http://python.org/doc/Copyright.html) modified for mab2bib 2005/2006 by Henning Hraban Ramm