有没有什么类或者什么方法将中文转换成....,例如"我们",转换以后UNICODE码是"\u6211\u4EEC" String str = new String("我们", "GBK"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用JDK的bin目录下的native2ascii.bat文件native2ascii [options] [inputfile [outputfile]]Converts a file with native-encoded characters (characters which are non-Latin 1 and non-Unicode) to one with Unicode-encoded characters. String s;int[]x;String[]rschar[]c=s.toCharArray();for(int i=0;i<=s.length();i++){int x[i]=Character.getNumericValue(char c[i]);rs[i]=new String("\\u"+x[i]);}return rs; jdk1.5问题 求教了。。。 Swing编程中关于窗口重绘的问题(困扰我好几天了,救命啊。。) java 包中的类的访问问题 一个很奇怪的FileNotFoundException异常,(倾家荡产问个问题) 直线折弯技术 请问JDBC有没有取得新插入的记录的id的函数? 用sun.net.ftp.FtpClient类如何获取目录下的文件及目录列表 JAVA最适用来做什么? 怎么不是别中文? 高分 求一句话的翻译! 谢谢! JLabel(String text, int horizontalAlignment)中的参数??? JDK安装错误,请指教,谢谢!
char[]c=s.toCharArray();
for(int i=0;i<=s.length();i++)
{int x[i]=Character.getNumericValue(char c[i]);
rs[i]=new String("\\u"+x[i]);}
return rs;