[
http://www.stripesframework.org/jira/browse/STS-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter closed STS-328.
--------------------------
> CommonsMultipartWrapper did not use character encoding from HttpServletRequest
> ------------------------------------------------------------------------------
>
> Key: STS-328
> URL: http://www.stripesframework.org/jira/browse/STS-328
> Project: Stripes
> Issue Type: Improvement
> Affects Versions: Release 1.4.2
> Environment: commons-fileupload-1.1,
> mozilla-firefox 1.5.0.7,
> ISO-8859-15-System-locale
> UTF-8 jsp-encoding (also set in web.xml for stripes' LocalePicker)
> Reporter: Jens Illig
> Assignee: Ben Gunter
> Fix For: Release 1.4.3
>
>
> Posting the same HTML-Form with or without a single stripes:file parameter
> affected whether stripes:text-RequestParameter-StringProperties were injected
> into the ActionBean with right or wrong character encoding (German Umlaute).
> After some debugging I found out that
> net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper does:
> [...]
> for (FileItem item : items) {
> // If it's a form field, add the string value to the list
> if (item.isFormField()) {
> List<String> values = params.get(item.getFieldName());
> if (values == null) {
> values = new ArrayList<String>();
> params.put(item.getFieldName(), values);
> }
> values.add(item.getString());
> }
> // Else store the file param
> else {
> files.put(item.getFieldName(), item);
> }
> }
> [...]
> in its build method. I changed
> [...]
> values.add(item.getString());
> [...]
> to
> [...]
> values.add( (request.getCharacterEncoding() != null) ?
> item.getString(request.getCharacterEncoding()) : item.getString() );
> [...]
> and everythink works fine for me.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development