0

I am confronted with a strange situation that I do not understand. I run a Java-Swing test application, that reads Arab-UTF8 hard-coded strings, builds a simple JXTable and shows the UTF8 strings on a column. The application is an executable jar that is run with command

java -cp test.jar org.test.MainTest

If there is a need I can attach the code of the application. The application shows Arab characters if run on Windows, or Mac but not HP-UX. We are talking about HP-UX B11.31 running jdk 1.7.0.0.05. Please note that I checked the character settings at all possible levels on the HP-UX system. At Java level the default encoding is UTF-8 (file.encoding) and, at Swing level, the default font used by JXTAble (and enclosing panel) is Dialog and this font tested for a hard-coded arab string with method canDisplayUpTo(String x) returns -1 (all characters are displayable). I don't understand especially that, up to the moment the strings are fed into Swing, I manipulate only Java strings that are UTF8 compatible, or should be by definition.

Is anyone aware of HP-UX UTF8 encoding/decoding for Java/Swing? Is there something that escapes me, something that I should check? Any help will be greatly appreciated. Thanks.

ioni28
  • 81
  • 1
  • 4
  • [test the Fonts](http://stackoverflow.com/a/9022901/714968), afaik there are ASCII Fonts – mKorbel Jun 24 '14 at 07:27
  • Hi, I tested the font on HP-UX with method canDisplayUpTo(arab_String) and returns -1 (all characters are printable). Is there another way to test the font? I do not change the font in any way, and for all three operating systems (Windows, MacOS, HP-UX) the default font for Swing is Dialog. – ioni28 Jun 24 '14 at 13:31
  • did you tested code linked in my comment – mKorbel Jun 24 '14 at 13:32

0 Answers0