• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jforum/admin,save Chinese incorrectly

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic