title: gnuplot/pngcairo not rendering UTF-8 character correctly
body: <p>I have two CentOS 7.4.1708 machines, running gnuplot 4.6 patchlevel 2,
   currently behaving differently, and I can't work out why.</p>
  
  <p>Install fonts:</p>
  
  <pre><code>sudo yum install dejavu-sans-mono-fonts
  </code></pre>
  
  <p>Then create the following GNUplot script:</p>
  
  <pre><code>cat &lt;&lt; EOF &gt; test.gnuplot
  set terminal pngcairo enhanced font "DejaVuSansMono,10"
  set encoding utf8
  set title "同"
  plot sin(x)
  EOF
  </code></pre>
  
  <p>Finally, pipe it into the application:</p>
  
  <pre><code>cat test.gnuplot | gnuplot &gt; test.png
  </code></pre>
  
  <p>On one machine I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/i0NQD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i0NQD.png" alt="Working as expected"></a></p>
  
  <p>But on another I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/UZmqr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UZmqr.png" alt="Not working as expected"></a></p>
  
  <p>I can't work out the cause of the discrepancy. The desired character <em>is</em> U+540C so it's not like the second machine is interpreting the input bytes any differently; it's just not rendering the glyph.</p>
  
  <p>What differences in system configuration should I be looking for?</p>
  
  <p>More broadly, how can I "fix" the output in the second case? I don't even vastly care if some characters end up getting replaced by placeholders like this (after all, I must recognise that not all fonts implement all glyphs), but those placeholders being rendered at super-size <em>is</em> a problem.</p>