We were asked to make a program that will read a text file and show a summary of Unicode characters. While doing this I encountered a problem with some Unicode characters that appear to be printed as a question mark in my console. However when I output the same Unicode text using Swing, its not a question mark anymore
System.out.println("\u0126"); // appears to be ? in my console.
JOptionPane.showMessageDialog(null,"\u0126"); // seems to display the character successfuly
I could just leave the problem behind since I'm gonna make use of GUI, but I want an explanation, something that beginners like me could understand.
Why do some Unicode characters appear to be a question mark printed in the console but does not in Swing, printing correctly? (Eclipse, NetBeans, JCreator, JGrasp do the same, I thought its a problem with my IDE).
Is it a problem in Encoding or Font? And what should I do in order to successfully display Unicode text in the console without any trouble of question marks in the future?