标签:
String str = "任意字符串"; str = new String(str.getBytes("gbk"),"utf-8"); 备注说明: str.getBytes("UTF-8"); 的意思是以UTF-8的编码取得字节 new String(XXX,"UTF-8"); 的意思是以UTF-8的编码生成字符串
【java】转码
原文地址:http://www.cnblogs.com/gyjx2016/p/5957284.html