aspose file tools*
The moose likes JForum and the fly likes jforum/admin,save Chinese incorrectly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "jforum/admin,save Chinese incorrectly" Watch "jforum/admin,save Chinese incorrectly" New topic
Author

jforum/admin,save Chinese incorrectly

xu yongqi
Greenhorn

Joined: Aug 17, 2012
Posts: 6
when I use the functions of Admin,it can't save Chinese correctly.
for example:
url:jforum.page
action=editSave
module=adminCategories
category_name=中国

In jforum servlet,req.getParameter("category_name")="???",but when I use the functions of non-admin,such as createTopic,post,and so on,it can save Chinese correctly.

I think it might be related with 'enctype="multipart/form-data"'.If form has 'enctype="multipart/form-data"',it can save Chinese correctly,if it has not,save wrongly.

A few days ago,it all works well.I don't know why it fails now.
I have already set encoding=UTF-8.
xu yongqi
Greenhorn

Joined: Aug 17, 2012
Posts: 6
I find the cause.
I integrated jforum with cas.So I added cas filter in web.xml,then request.getParameter() of Chinese parameter got wrongly.
Then I added a characterEnocdingFilter in web.xml,it included request.setCharacterEncoding("UTF-8")
characterEnocdingFilter is the first filter,cas filter is second,then is jforum own filter.
Now it works all right.
I don't understand why I must add characterEnocdingFilter if I add cas filter.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jforum/admin,save Chinese incorrectly
 
Similar Threads
User profile is not saved in correct encoding when use simple chinese
Image insertion problem
Struts upload not working
Java Mail Question...
jsp request and form's enctype="multipart/form-data" problem