Issue 77 in rapid-framework: 表单中文乱码

35 views
Skip to first unread message

rapid-f...@googlecode.com

unread,
Jul 20, 2011, 3:47:01 AM7/20/11
to rapid-f...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 77 by baiyun...@gmail.com: 表单中文乱码
http://code.google.com/p/rapid-framework/issues/detail?id=77

rapid版本:rapid-framework-common-3.9.3.20100923

使用的相关插件组合是:struts2+ibatis3

使用示例的USER_INFO,在界面搜索栏username输入中文,后台的UserInfoQuery对象
username乱码
com.company.project.vo.query.UserInfoQuery@ad40a0[
userId=<null>
username=白 --->这里应该是个"白"字
password=<null>
birthDateBegin=<null>
birthDateEnd=<null>
sex=<null>
age=<null>
filters=<null>
pageNumber=1
pageSize=10
sortColumns=<null>
]
我觉得是源码PageRequestFactory.java 45行
Map params = WebUtils.getParametersStartingWith(request, "");
这里spring方法没有处理中文问题导致的

rapid-f...@googlecode.com

unread,
Jul 20, 2011, 3:53:11 AM7/20/11
to rapid-f...@googlegroups.com

Comment #1 on issue 77 by baiyun...@gmail.com: 表单中文乱码
http://code.google.com/p/rapid-framework/issues/detail?id=77

小弟愚昧了,这样处理就可以了
在jsp head里添加
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

rapid-f...@googlecode.com

unread,
Apr 23, 2012, 9:30:06 PM4/23/12
to rapid-f...@googlegroups.com

Comment #2 on issue 77 by longxing...@gmail.com: 表单中文乱码
http://code.google.com/p/rapid-framework/issues/detail?id=77

我加了 <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">,query.jsp查询后返回界面上仍为乱码啊,再者,我看到
/commons/meta.jsp中已经加了这句啊

wap

unread,
Apr 24, 2012, 10:12:46 PM4/24/12
to rapid-f...@googlegroups.com

可以用过滤器来搞

> --
> 您收到此信息是由于您订阅了 Google 论坛“rapid-framework”论坛。
> 要在此论坛发帖,请发电子邮件到 rapid-f...@googlegroups.com
> 要退订此论坛,请发邮件至 rapid-framewo...@googlegroups.com
> 更多选项,请通过
> https://groups.google.com/group/rapid-framework?hl=zh-CN 访问该论坛

rapid-f...@googlecode.com

unread,
Jun 30, 2012, 11:06:54 AM6/30/12
to rapid-f...@googlegroups.com

Comment #3 on issue 77 by gloCalhe...@gmail.com: 表单中文乱码
http://code.google.com/p/rapid-framework/issues/detail?id=77

》》》》使用示例的USER_INFO,在界面搜索栏username输入中文,
》》》后台的UserInfoQuery对象username乱码

我用的是Rapid的Hibernate,也出现了乱码问题。
其实你看看如果你的示例USER_INFO的搜索栏是在一个Form里的话,你改成post方法而
不是Get方法,就可以
了,不会乱码。
也就是说如果你的Creat方法不会乱码,那改成Post方法应该就不会乱码。
请对比一下你的Create方法。

Reply all
Reply to author
Forward
0 new messages