I have the following issue using java 1.4
I try to display a very simple HTML document in a JTextPane that contains chinese characters.
If the locale used when launching the java virtual machine is user.language=zh and user.country=CN the graphical characters are rendered correctly.
For any other locale, the characters are rendered as squares.
The difference I see is that java 1.4 uses a different font.properties file for each locale. In this particular case, the font.properties.zh file contains an extra entry:
dialog.plain.0=Arial,ANSI_CHARSET
**dialog.plain.1=\u5b8b\u4f53,GB2312_CHARSET**
dialog.plain.1=WingDings,SYMBOL_CHARSET
dialog.plain.2=Symbol,SYMBOL_CHARSET
Now, this entry is not available for the other locales.
The problem I have, is that I need to be able to render this string while using any locale. Furthermore, I can't modify the font.properties file to add extra entries as I have no control on the JVM used by the client.
In Java 1.5 this problem does not occur.
Is there any way to add this mapping programmatically? Is there any other solution?