Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表单中文乱码 #77

Open
GoogleCodeExporter opened this issue Mar 28, 2016 · 3 comments
Open

表单中文乱码 #77

GoogleCodeExporter opened this issue Mar 28, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

rapid版本:rapid-framework-common-3.9.3.20100923

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

使用示例的USER_INFO,在界面搜索栏username输入中文,后台的UserI
nfoQuery对象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方法没有处理中文问题导致的

Original issue reported on code.google.com by baiyun...@gmail.com on 20 Jul 2011 at 7:46

@GoogleCodeExporter
Copy link
Author

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

Original comment by baiyun...@gmail.com on 20 Jul 2011 at 7:52

@GoogleCodeExporter
Copy link
Author

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

Original comment by longxing...@gmail.com on 24 Apr 2012 at 1:30

@GoogleCodeExporter
Copy link
Author

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

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

Original comment by gloCalhe...@gmail.com on 30 Jun 2012 at 3:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant