public static void main(String[] args) {
String unicode = "";
String s="用户名";
char[] charAry = new char[s.length()];
for(int i=; i<charAry.length; i++) {
charAry[i] = (char)s.charAt(i);
unicode+="\\u" + Integer.toString(charAry[i], );
}
System.out.println(unicode);
}
04-28 09:50