字符串转换不同的字符集utf-8---》gbk

来源:互联网 发布:量表数据怎么录入excel 编辑:程序博客网 时间:2024/05/22 02:28
public static void main(String[] args) {    String ss="认同与哦哦";    try {String result= new String(ss.getBytes("UTF-8"),"UTF-8");System.out.println(result);} catch (UnsupportedEncodingException e) {// TODO Auto-generated catch blocke.printStackTrace();}}

原创粉丝点击