问题
In the java se 7 specifications it is written that
A Java compiler should use the \uxxxx notation as an output format to display Unicode characters when a suitable font is not available.
But when I run the below program, the command prompt displays a Hell?, World!
instead of \uxxxx notation.
import java.io.*;
class test{
public static void main(String args[]){
System.out.println("Hell\u0c13, World!");
}
}
As my command prompt doesn't have a suitabe font, the compiler must be printing the below output.
Hell\u0c13, World!
I'm also wondering how the java compiler will determine whether suitable font is available or not. Please help.
来源:https://stackoverflow.com/questions/44627898/java-program-to-output-unicode-chars-in-cmd