title: Java Unable to load arabic character U+062C into PDF on PDFBox even though it exists on the font
body: <p>The font I am using is an arial.tff. Aside from this specific character (U+062C) all the other characters seem to be working fine.</p>
  <p>Somehow when it reaches this point it just throws:</p>
  <pre><code>java.lang.IllegalArgumentException: U+062C ('afii57420') is not available in this font Helvetica (generic: ArialMT) encoding: StandardEncoding with differences
  </code></pre>
  <p>Code below:</p>
  <pre><code>PDFont font = PDType0Font.load(pdfDocumentTemplate, this.resourceLoader.getResource(&quot;classpath:arial.ttf&quot;).getInputStream(), false);
  PDAcroForm pdAcroForm = pdAcroFormOptional.get();
  String fontName = pdAcroForm.getDefaultResources()
                              .add(font)
                              .getName();
  
  for (GenerateDocumentPlaceholder placeholder : command.getPlaceholderList()) {
      PDTextField field = (PDTextField) pdAcroForm.getField(placeholder.getName());
      try {
          if (field != null) {
              field.setDefaultAppearance(&quot;/&quot; + fontName + &quot; 0 Tf 0 g&quot;);
              field.setValue(placeholder.getValue());
          }
      } catch (Exception ex) {
          log.error(&quot;Error while updating field {}&quot;, placeholder.getValue(), ex);
      }
  }
  </code></pre>
  <p>And here's the font with the character:
  <a href="https://i.stack.imgur.com/4fRuZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4fRuZ.png" alt="enter image description here" /></a></p>
  <p>Any ideas?</p>