title: Using unicode character in generated PDF using iText5
body: <p>I have a problem with with unicode characters in a generated PDF. Everything works fine on my own workstation, but on the test environment things go wrong.</p>
  
  <p>Code inserting value is following:</p>
  
  <pre><code>Font boldDefaultFont = FontFactory.getFont(FontFactory.HELVETICA, 10, Font.BOLD);
  // ...
  PdfPCell headerCell = new PdfPCell();
  // unit.getName() returns "°C"
  Phrase header =  new Phrase(unit.getName(), boldDefaultFont);
  headerCell.addElement(header);
  </code></pre>
  
  <p>Java source code is in UTF-8.</p>
  
  <p>When this is run in my environment (java 1.6.0_18, WinXP) cell contains <code>°C</code> as I would expect, but in test-environment (java 1.6.0_18, Win2003) result is <code>Â°C</code>. I've figured out that this is a encoding-problem (UTF-8 '°' is 0xc2b0 which equals 'Â°' in iso-8859-1). </p>
  
  <p>For now I've tried following:</p>
  
  <p>1) adding <code>-Dfile.encoding=utf8</code> to java options (no effect in either environment)<br/>
  2) adding ARIALUNI.TTF to test environments C:\WINDOWS\Fonts (no effect)<br/>
  3) encoding unit.getName() to iso-8859-1, but it made the degree sing disappear in my machine.<br/></p>
  
  <p>Environment that views the pdf has no effect, pdf generated on my workstation shows nicely everywhere and vice versa. </p>
  
  <p>Does anyone have experience on this subject? I bet there is a way to get this working in both environments.</p>