不管它是什么编码,直接这么写不可以吗:
String s = "不知道何种编码的字符串";
byte[] b = s.getBytes("gb2312");
String s1 = new String(b);
不太明白的说。:)
String s = "不知道何种编码的字符串";
byte[] b = s.getBytes("gb2312");
String s1 = new String(b);
不太明白的说。:)
如果是JavaScript的有JavaScript Encoder加密
String newstring = new String(s.getBytes("ISO8859-1"));
---------就是说把串s 结成了16位的unicode码.