DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23255>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23255 FormFile.getFileName() problem in multibyte character file name ------- Additional Comments From [EMAIL PROTECTED] 2004-01-20 08:56 ------- I tested EncodingFilter, but it didn't work well. Because web browsers send "multipart/form-data" data encoding with the same encoding as current web page. We often set character encoding with HttpServletRequest#setCharacterEncoding() so that Servlet containers can parse request parameter correctly, but the setting isn't used when Struts parses "multipart/form-data" data because CommonsMultipartRequestHandler never tell the request encoding to a org.apache.commons.fileupload.DiskFileUpload instance. The solution of thie problem is that ommonsMultipartRequestHandler#handleRequest() set the request encoding to a DiskFileUpload instance. In other words, to make handleRequest() call DiskFileUpload#setHeaderEncoding() with the value of HttpServletRequest#getCharacterEncoding() as the argument like: ------------------------------------------------------ DiskFileUpload upload = new DiskFileUpload(); upload.setHeaderEncoding(request.getCharacterEncoding()); ------------------------------------------------------ I modified CommonsMultipartRequestHandler#handleRequest() like above and tried to work well, and it worked just well with EncodingFilter. (Note that thie approach requires that the request encoding is set before Struts parses "multipart/form-data" request data. Thus EncodingFilter is necessary.) I attached the patch. Please check it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
