JAVA UTF-8字符转换为GBK

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

猜你喜欢

转载自blog.csdn.net/yj108283/article/details/80236157