String 将GBK转UTF-8

public void transfer(String xml) throws Exception {
        return new String(xml.getBytes("gbk"),"utf-8");
}

 

posted @ 2017-09-19 09:38  showme1942  阅读(1486)  评论(0编辑  收藏  举报