定義一字符串:
String t = "hfjkds中國中國中國中國中國中國中國中國中國中國中國中國中國中國中國中國中國中國中國中國hfsdkj<img src='sasa' /> fjldsajflkdsjaflkdsjalf <img src='sada' ait=''/>sfdsfadas";
思路:先轉爲Unicode,然後轉爲GBK String utf8 = new String(t.getBytes( "UTF-8"));
System.out.println(utf8);
String unicode = new String(utf8.getBytes(),"UTF-8");
System.out.println(unicode);
String gbk = new String(unicode.getBytes("GBK"));
System.out.println(gbk);