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

Unicode与汉语转换工具类

2012-09-24 
Unicode与中文转换工具类在上一家公司做Android注入时,如果注入中文会有问题,需要将中文转换为unicode码注

Unicode与中文转换工具类

在上一家公司做Android注入时,如果注入中文会有问题,需要将中文转换为unicode码注入,在网上查了一下转换工具类,大多数都是如下的解决方案:

?

public static void main(String[] args){     String theString="中文汉字+123";     System.out.println(cstk.toUnicode(theString, false));     System.out.println(cstk.fromUnicode(theString.toCharArray(), 0, theString.length(), new char[1024]));     }

希望对看到的人有所帮助。

热点排行