You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2008/12/17 04:50:38 UTC
[jira] Updated: (STR-2117) [PATCH] Way to specify character
encoding of HTTP requests is needed for ActionForm
[ https://issues.apache.org/struts/browse/STR-2117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-2117:
-------------------------------
Assignee: (was: Kuro Kurosaka)
> [PATCH] Way to specify character encoding of HTTP requests is needed for ActionForm
> -----------------------------------------------------------------------------------
>
> Key: STR-2117
> URL: https://issues.apache.org/struts/browse/STR-2117
> Project: Struts 1
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.1.0
> Environment: Operating System: All
> Platform: All
> Reporter: Kuro Kurosaka
> Priority: Minor
> Attachments: reqEncoding-patch.txt, RequestEncodingPatchWithUpdatedDTD.txt
>
>
> Currently, ActionForm (and its subclasses) interprets HTTP requests
> in the container's default character encoding (usually ISO-8859-1),
> if no charset attribute is found in the request's Content-Type header,
> which is normally the case.
> As a result, parameters that are not encoded in ISO-8859-1 get corrupted.
> Developers in Japan and elsewhere have to implement workarounds to this,
> such as calling request.setCharacterEncoding() from within reset() method
> of ActionForm subclasses they write. But these workarounds are not
> offcially documented, and each developer has to find it somehow. This is
> making Struts more difficult to use than necessary.
> I propose that a new attribute named requestEncoding should be added
> to the <controller/> tag as an optional attribute. This would be used as:
> <controller
> processorClass="org.apache.struts.action.RequestProcessor
> debug="0"
> contentType="text/html"
> requestEncoding="Shift_JIS" />
> NOTES:
> (1) Hopefully this also fixes STR-1480, but since I am not too sure, I opened a
> new bug.
> (2) This should make an enhancement request 29668 unnecesary.
> (3) In Struts dev mailing list, I proposed that each <form-bean> element should
> be able to specify its own character encoding. But I decided it would be too
> fine-grained that not many people would use.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.