如果你是读数据库,显示在JSP面中,应该这样:<%@ page contentType="text/html;charset=gb2312"%>
解决方案 »
- awt下对于图片加载的一些困惑希望各位解答!
- 求一个算法,谢谢
- 如何用java实现从大批文件中筛选 phone number的设计,说明设计思路?
- 请教 Runtime.getRuntime().exec("ls"); 没有输出问题,谢谢
- JAVA 完成树的遍历
- What method call is used to tell a thread that it has the opportunity to run?
- 哪种语言编程效率最高?
- 线程间通信问题,我想通过对话框application实现,ggjj帮忙看下,急,在线!!!!!
- 怎样获得当前所用的默认字体?
- java applet能调用jdbc吗?初学,请指教!
- 請教 : 如何複製一個對象 , clone() 不行, clone() 方法有甚麼作用?
- 奇怪的异常---“不支持的字符集 !!: DBConversion”
String temp=new String(name.getBytes("ISO8859_1"),"GB2312");
file.encoding=GB2312
或
file.encoding=GBK
msgTxt=new String (msgTxt.getBytes("ISO-8859-1"),"gb2312");//code convertation
如果是存入数据库成乱码,则
msgTxt=new String (msgTxt.getBytes("gb2312"),"ISO-8859-1");//code convertation
我就是这样处理的,没有问题阿
给你两个连接,去看看
http://www.csdn.net/expert/topic/711/711018.xml?temp=7.930934E-03
http://www.csdn.net/expert/topic/711/711826.xml?temp=.625271