#125 Fix diacritical marks problem when generating a PDF

Sorry for terrible code.
I feel sorry for this. But whatever.