码迷,mamicode.com
首页 > 其他好文 > 详细

字段的转码

时间:2016-07-14 11:46:00      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

1 if (note.equals(new String(note.getBytes("GB2312"), "GB2312"))) {
2                 note = new String(note.getBytes("GB2312"), "utf-8");
3             } else if (note.equals(new String(note.getBytes("iso-8859-1"), "iso-8859-1"))) {
4                 note = new String(note.getBytes("iso-8859-1"), "utf-8");
5             } else if (note.equals(new String(note.getBytes("UTF-8"), "UTF-8"))) {
6                 note = new String(note.getBytes("UTF-8"), "utf-8");
7             } else if (note.equals(new String(note.getBytes("GBK"), "GBK"))) {
8                 note = new String(note.getBytes("GBK"), "utf-8");
9             }

 

字段的转码

标签:

原文地址:http://www.cnblogs.com/0519xf/p/5669899.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!