So I want to println in ACM library dialog with a symbol from a non-English language in Java, but when I run it, only little squares appear.
IODialog dialog = getDialog();
dialog.println("ზაზა");
So I want to println in ACM library dialog with a symbol from a non-English language in Java, but when I run it, only little squares appear.
IODialog dialog = getDialog();
dialog.println("ზაზა");
IODialog uses JOptionPane for its implementation, therefore it is subject to the same unicode handling problems that JOptionPane has.
Here there is a way of overcoming the problem. But we don't like links so let me summarize:
As per the comment above, playing with fonts is what you want to explore. Create a new font like this:
and then you set the actual font with whichever font it is that contains your unicode characters with this line:
So what this does is it changes your default font. There is no more you have to do. If you need to change back to your default font before you made the change, well you have to reset the default font in this way.