把这个String对象重新构造一下,使用GB2312编码,就可以显示中文了。
String strText = new String(str.getBytes(), "GB2312");
threadFirst.setText(strText) ;
String strText = new String(str.getBytes(), "GB2312");
threadFirst.setText(strText) ;
其实以前我公司的一个人曾很深入的研究过,并解决了的,可我当时也没有听懂,最终结果好像是什么也不用转化也能正常的, 我记得好像是仔细看jdk的类结果和库内容
怎么就是不行呢?
楼上兄弟们若有这方面的例子,给我来一份吧,万分感谢!
[email protected]
String cid=new String((request.getParameter("txtid")).getBytes("ISO8859-1"),"GB2312");