title: How do I fix "missing character" warnings when converting from docx to pdf using Pandoc and LaTeX?
body: <h2>Goal</h2>
  
  <p>I have several thousand Khmer-language <code>.docx</code> files and would like to convert them to <code>.pdf</code> format using <a href="https://pandoc.org/" rel="noreferrer">Pandoc</a>. </p>
  
  <h2>Background</h2>
  
  <p>I installed Pandoc using MacPorts. Pandoc requires LaTeX for PDF conversion, so I installed <a href="https://tug.org/mactex/" rel="noreferrer">MacTeX</a>. Installation appears to have gone properly, and I've been able to convert English-language <code>.docx</code> files into <code>.pdf</code> without difficulty.</p>
  
  <h2>Attempt 1</h2>
  
  <p>When I try to convert a Khmer-language file (you can find an example at <a href="https://briancroxall.net/pandoc/transcription.docx" rel="noreferrer">https://briancroxall.net/pandoc/transcription.docx</a>) to PDF, I use the following command:</p>
  
  <pre><code>pandoc transcription.docx  -s -o transcript.pdf
  
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <pre><code>Error producing PDF.
  ! Package inputenc Error: Unicode character អ (U+17A2)
  (inputenc)                not set up for use with LaTeX.
  
  See the inputenc package documentation for explanation.
  Type  H &lt;return&gt;  for immediate help.
   ...                                              
  
  l.64 ...�នៅសម័យប៉ុល ពត។}
  
  Try running pandoc with --pdf-engine=xelatex.
  </code></pre>
  
  <h2>Attempt 2</h2>
  
  <p>Following this suggestion, I use this command:</p>
  
  <pre><code>pandoc --pdf-engine=xelatex transcription.docx  -s -o transcript.pdf
  
  </code></pre>
  
  <p>Pandoc then throws an error message for every Khmer character in the text:</p>
  
  <pre><code>[WARNING] Missing character: There is no អ in font [lmroman10-bold]:mapping=tex-text;!
  [WARNING] Missing character: There is no ្ in font [lmroman10-bold]:mapping=tex-text;!
  [WARNING] Missing character: There is no ន in font [lmroman10-bold]:mapping=tex-text;!
  ...
  </code></pre>
  
  <p>A PDF is produced by this process (see <a href="https://briancroxall.net/pandoc/transcript.pdf" rel="noreferrer">https://briancroxall.net/pandoc/transcript.pdf</a>), but it is largely empty.</p>
  
  <h2>Issue</h2>
  
  <p>As best as I can tell, this suggests that Khmer characters are not being available in the LaTeX engine that I'm trying to use to do the conversion. Whether or not that is so, how can I manage this file conversion successfully?</p>