# UTF-8 characters not displayed with xelatex (pandoc)

I'm using XeLaTeX with pandoc to generate PDFs from markdown files: but the "⇒" character (UTF8) does not get correctly generated (it's not show in the output file). Is it possible to get the "⇒" character converted from markdown to PDF without using $\Rightarrow$?

(I'm already using the xunicode and xlxstra packages)

-
Pandoc converts the file correctly. The point is that the text font you use (probably latin modern) does not contain the ⇒ character. If you change the font to e.g. iwona, the ⇒ symbol appears. –  Marco Feb 24 '13 at 21:03
Thanks! ...It was embarassing simple to solve :) –  Federico Feb 24 '13 at 21:51
@Marco: Make that an answer, please. –  Martin Schröder Feb 25 '13 at 11:19

Pandoc converts the file correctly. If you open the resulting file with a text editor you see the ⇒ symbol, which in turn means that pandoc has done a good job.

The point is that the text font you use (probably Latin Modern) does not contain the ⇒ character. If you change the font to a different one which contains the ⇒ symbol, e.g. iwona, it will appear as expected.

If you want to keep using Latin Modern as bodyfont, here's a small hack which takes the ⇒ symbol from the math font instead (it's a plain TeX solution, maybe LaTeX provides some nice abstraction around this): Place the following code into fixRightarrow.tex:

\catcode`\⇒\active
\def⇒{$\Rightarrow$}

and call pandoc with the --include-before-body argument:

pandoc \
--include-before-body=fixRightarrow.tex \
--to=latex                              \
--output=output.tex                     \
input.md
-