Fix utf8 encoding problems in generated TeX document.