tal 发表于 2013-2-3 11:22:53

16进制字符转字符串

public static void main(String[] args) {
String a = "移动";//移动
String [] b = a.split("&#");
int i = 0;
for (String str : b) {
if (!"".equals(b)) {
b = str.replace(";", "");
char c= (char)Integer.valueOf(Integer.toString(new Integer(b),   16),16).intValue();
System.out.println(c);
}
}
}
页: [1]
查看完整版本: 16进制字符转字符串