中文字符级转换
来源:互联网 发布:淘宝上怎么买淘宝小号 编辑:程序博客网 时间:2024/06/15 13:37
1 public class Chinese { 2 public static String toUnicode(String strvalue) { 3 try { 4 if (strvalue == null) { 5 return null; 6 } 7 else { 8 strvalue = new String(strvalue.getBytes("GBK"), "ISO8859_1"); 9 return strvalue;10 }11 }12 catch (Exception e) {13 return "";14 }15 }16 17 public static String toChinese(String strvalue) {18 try {19 if (strvalue == null) {20 return "";21 }22 else {23 strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");24 return strvalue;25 }26 }27 catch (Exception e) {28 return "";29 }30 }31 32 public static String chinese(String a) {33 try {34 return new String(a.getBytes("ISO-8859-1"));35 }36 catch (UnsupportedEncodingException ex) {37 return null;38 }39 }40 }
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 中文字符级转换
- 中文字符转换
- PHP中文字符转换
- lr_convert_string_encoding中文字符转换
- java环境(中文)字符转换
- java 字符大小写(中文)转换
- Java中文字符转换拼音
- 数字转换中文字符(C#)
- GTK中文字符转换函数
- Eclipse国际化中文字符转换
- Eclipse国际化中文字符转换
- unicode字符转换成中文
- golang中文字符编码转换
- 把中文字符转换成Utf8编码
- 将英文字符转换成中文
- 中文字符转换为ascii码
- 字符及中文转换到Ascii码
- C#中文和UNICODE字符转换方法
- NEU 1222: Sweep the snow PRIM()
- 惊群现象
- dubbo管理控制台安装
- hdu 1412 {A} + {B}
- 自学C语言
- 中文字符级转换
- IOS7开发~TextKit学习
- vs2010没有 ActiveX Control Test Container
- 从一亿个数中找出最大的一万个数【转】
- windows下Qt 调用外部exe的方法
- htmlunit模拟注册
- 热评php抓取页面的几种方式
- 算法导论-第16章
- C语言之libevent和socket示例