读书人

BIG5转UTF-八与UTF-8转BIG5

发布时间: 2013-11-09 17:06:47 作者: rapoo

BIG5转UTF-8与UTF-8转BIG5

自定义BIG5转UTF-8

public String big52unicode(String strBIG5)   {     String strReturn="";     try     {       strReturn = new String(strBIG5.getBytes("big5"), "UTF-8");     }     catch (Exception e)     {       e.printStackTrace();     }     return strReturn;   } 

? 自定义UTF-8转BIG5

public String unicode2big5(String strUTF8)   {     String strReturn="";     try     {       strReturn = new String(strUTF8.getBytes("UTF-8"), "big5");     }     catch (Exception e)     {       e.printStackTrace();     }     return strReturn;   } }
?

读书人网 >移动开发

热点推荐