编程论坛
注册
登录
编程论坛
→
J2EE论坛
数据库字符转换问题
glorysea
发布于 2007-11-04 15:48, 619 次点击
大家看看地址栏啊,从数据库查询数据该增加怎样一条语句才行啊?
用户名
id
邮箱
地址
glorysea
001
glory@163.com
??????
3 回复
#2
guoxhvip
2007-11-04 17:28
是编码问题
String address = new String(request.getParameter("address").trim().getBytes("8859_1"))
#3
glorysea
2007-11-04 18:09
哦,谢谢版主了,我试试!
#4
yanwu1515
2007-11-19 09:35
插入前加上:request.setCharacterEncoding("gb2312");就都OK了!
1