posts - 325,  comments - 25,  trackbacks - 0
1.html中文问题
<meta http-equiv="Content-Type" content="text/html;charset="gb2312">
2.jsp页面中文问题
<%@ page contentType="text/html;charset=gb2312" language="java"%>
3.servlet响应结果中文问题
response.setCharacterEncoding("gb2312");
4.页面数据传输中文问题
在web.xml中配置<filter>
5.http(get)请求中文问题
String param=request.getParameter("param");
if(param!=null) param=new String(param.getBytes("ISO-8859-1"),"gb2312");
如果 http(get)请求中传递中文参数比较多,可以修改tomcat下server.xml
<Connector port="8080"
                    maxThreds="150"
                    minSpareThreds="25"
                    maxSpareThreds="75"
                    enableLookups="false"
                    redirectPort="8443" 
                    acceptCount="100"
                    debug="0"
                    connection Timeout="20000"
                    disableUploadTimeout="true"
                    URIEncoding="GB2312"/>
6.mysql中文问题
在jdbc驱动的URL上:
jdbc:mysql://localhost/test?user=root&password=123&useUnicode=true&characterEncoding=gb2312
或修改mysql.ini 下的mysql默认字符设置
posted on 2008-05-25 23:31 长春语林科技 阅读(195) 评论(0)  编辑  收藏 所属分类: util

只有注册用户登录后才能发表评论。


网站导航:
 
<2008年5月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

 

长春语林科技欢迎您!

常用链接

留言簿(6)

随笔分类

随笔档案

文章分类

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜