Search code examples
fontsitextsolarisaix

charExists() of BaseFont in iText works differently, depending on OS


charExists() api of BaseFont in iText works differently, depending on OS(or Machine).

Return value is different, even same character and same font.(physical font file is same, too)

One machine is AIX OS and another machine is Sun Solaris OS.

What is a factor affecting the result?

What can i do to get same return value in this case?

What is checkpoints? (ex. locale etc..)

best regards


Solution

  • Character to occur the problem is Unicode Character 'MIDDLE DOT'(U+00B7).

    When java change byte array to String, Java in IBM AIX changes 'MIDDLE DOT' to 'KATAKANA MIDDLE DOT' (U+30FB) unlike oracle java.

    So set the charset of String to UTF-8, then the problem is solved.

    Thanks.