标签:style blog color os ar for sp div log
1 public static void main(String[] args) { 2 String unicode = ""; 3 String s="用户名"; 4 char[] charAry = new char[s.length()]; 5 for(int i=0; i<charAry.length; i++) { 6 charAry[i] = (char)s.charAt(i); 7 unicode+="\\u" + Integer.toString(charAry[i], 16); 8 } 9 System.out.println(unicode); 10 }
标签:style blog color os ar for sp div log
原文地址:http://www.cnblogs.com/liun1994/p/4034132.html