JAVA UTF-8字符转换为GBK

        String t = "\u53d6";
        try {  
            String gbk=URLEncoder.encode(t,"GBK");
            System.out.println(gbk);  
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }   

 

posted @ 2016-08-11 16:32  程序员老郑  阅读(21457)  评论(0编辑  收藏  举报