我正在使用eclipse
asIDE
和尝试打印我得到的阿拉伯字符 ???????
,所以我想打印Unicode
if 阿拉伯字符
String displayChar(char c) {
if (c < '\u0010') {
return "0x0" + Integer.toHexString(c);
} else if (c < '\u0020' || c >= '\u007f') {
return "0x" + Integer.toHexString(c);
} else {
return c+"";
}
}
例如 :
displayChar('م'); // output is ?