I am trying to display the glyph corresponding to unicode 0x95E8. This codepoint is basically of CJK block (chinese, Japanese, Korean).
I am struggling to know if the glyph representation of this particular codepoint can be different for Japanese and Chinese.
When I am displaying this U+95E8 in a JTextArea, i am able to see "门" character on linux/windows. But when I am trying to display the same codepoint in my "embedded device". the displayed character changes to.
I want to know if this codepoint U+95E8 should have uniform representation in all the CJK (Chinese, Japanese, Korean) locales or is different for some of them. Can this kind of manifestation be because of different kind of font installed in different devices? I am sorry for my ignorance but I am not too much into internationalization.
import java.awt.*;
import java.awt.event.*;
import java.util.Locale;
import javax.swing.*;
public class TextDemo extends JPanel implements ActionListener {
public TextDemo() {
}
public void actionPerformed(ActionEvent evt) {
}
/**
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event dispatch thread.
* @throws InterruptedException
*/
private static void createAndShowGUI() throws InterruptedException {
JFrame frame = new JFrame(java.util.Locale.getDefault().getDisplayName());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container contentPane = frame.getContentPane();
contentPane.setLayout(new SpringLayout());
Dimension size = new Dimension(500, 500);
frame.setSize(size);
JTextArea textArea = new JTextArea();
//Font font1 = new Font("SansSerif", Font.BOLD, 20);
//textArea.setFont(font1);
textArea.setEditable(true);
textArea.setSize(new Dimension(400,400));
textArea.setDefaultLocale(java.util.Locale.SIMPLIFIED_CHINESE);
textArea.setText("Printing U+95E8 : \u95e8");
contentPane.add(textArea);
frame.setVisible(true);
}
public static void main (String[] args) {
java.util.Locale.setDefault(java.util.Locale.JAPANESE);
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
createAndShowGUI();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
}
}