PlanetJava
Custom Search

java-stripes-user
[Top] [All Lists]

Multipart form-data and multi-byte character problem

Subject: Multipart form-data and multi-byte character problem
Date: Thu, 24 Nov 2005 04:42:35 +0900
Hi,
I am using Stripes for these two weeks and really like it.
Thank you, Tim!
I encountered a trouble when using a form including both <stripes:file>
and <stripes:text>.
When Japanese characters are set in the text fields, these characters
are broken when they appear in the ActionBean. I think this is the case
for other multi-byte languages, too.
This seems to be because StripesRequestWrapper assumes no encoding is
set to the HttpServletRequest.
In line 110 of net.sourceforge.stripes.controller.StripesRequestWrapper,
  this.multipart = new MultipartRequest(request, pathToTempDir,
    maxTotalPostSize);
Just changing this line to
  this.multipart = new MultipartRequest(request, pathToTempDir,
    maxTotalPostSize, request.getCharacterEncoding());
should fix this problem.
I really appreciate if you could have time to check time problem.
Thanks,
Tomonori
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy