Whenever I try to convert html text which contains the trademark sign into LaTex, the trademark sign gets converted into "â„¢".

I convert a xml file to html and afterwards to latex.That's how the xml line with the trademark sign looks like:


It's converted correctly in the html file.

I tried adding these lines into my preamble file


but without success. It still gets converted into "â„¢"

I use pandoc to convert the html files into LaTex files.

Thanks in advance

  • Can't reproduce your issue, everything works as expected (i.e. the output is Abbreviation="Test™"). Which version of pandoc are you using, did you modify the template? – DG' Sep 28 '18 at 12:04
  • 1
    You don't explicitly say how you convert from xml to html, do you also use pandoc for that? – Marijn Sep 28 '18 at 12:08
  • Please provide a minimal working example (MWE) – DG' Sep 28 '18 at 12:14
  • The problem seems to be somewhere in your workflow: ™ appears to be converted correctly to in UTF-8, which in turn is interpreted as Windows-1252 (or ISO 8859-1), hence the â„¢. But without code this is just elaborate guesswork. – DG' Sep 28 '18 at 14:16

Thanks to DG's comment about the workflow I managed to find the problem:

I had a powershell script which replaced some lines in the .tex files and it messed the encoding up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.