首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

编码的字符串变换

2012-10-08 
编码的字符串转换? String str12344??String gstrnew?? String(str.getBytes( 原有编码 ), 目标编

编码的字符串转换

? String str="12344";
??String gstr=new?? String(str.getBytes( "原有编码 "), "目标编码 ");

例如:

? String str="12344";
??String gstr=new?? String(str.getBytes( "GB2312"), "ISO-8859-1");
??System.out.println(gstr);

热点排行