String t = xml; String utf8 = new String(( "UTF-8")); System.out.println(utf8); String unicode = new String((),"UTF-8"); System.out.println(unicode); String gbk = new String(("GBK")); System.out.println(gbk);
不过这个方法是无法把中文转码的。中文转码需要用URLEncoder这个方法
String t = xml; String utf8 = new String(( "UTF-8")); System.out.println(utf8); String unicode = new String((),"UTF-8"); System.out.println(unicode); String gbk = new String(("GBK")); System.out.println(gbk);
不过这个方法是无法把中文转码的。中文转码需要用URLEncoder这个方法