在Java中显示unicode
字符会显示问号符号。例如,我尝试打印“अ”。它的unicode
编号是U+0905,HTML表示为"अ"。下面的代码打印出问号而不是unicode
字符。
char aa = '\u0905';
String myString = aa + " result" ;
System.out.println(myString); // displays "? result"
有没有一种方法可以直接从 unicode
中显示字符而不使用 unicode
数字?例如,现在文件中保存了 "अ",如何在jsp中显示该文件。