You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2001/12/27 03:05:52 UTC

DO NOT REPLY [Bug 5593] New: - [PATCH] Form encoding enhancement.

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=5593>.
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=5593

[PATCH] Form encoding enhancement.

           Summary: [PATCH] Form encoding enhancement.
           Product: Cocoon 2
           Version: 2.1alpha CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: core
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: miyabe@jzf.co.jp


I considered it isn't able to expect that all components decode request 
parameter on each responsibility.
A patch enables servlet settings to set up the default encoding.

	<init-param>
	  <param-name>container-encoding</param-name>
	  <param-value>ISO-8859-1</param-value>
	</init-param>

	<init-param>
	  <param-name>form-encoding</param-name>
	  <param-value>Shift_JIS</param-value>
	</init-param>

and, new component "org.apache.cocoon.acting.SetCharacterEncodingAction" sets 
character encoding before more components work.

....
	<map:actions>
		<map:action name="suppose-encoding" 
src="org.apache.cocoon.acting.SetCharacterEncodingAction"/>
	</map:actions>
....
	<map:match pattern="request-euc">
	    <map:act type="suppose-encoding">
	        <map:parameter name="form-encoding" value="UTF-8"/>
	    </map:act>
		<map:generate type="request"/>
		<map:serialize type="xml"/>
	</map:match>
....

Sometimes it is better that encoding is specified by the client.
At that time the client appoints it with request parameter named "cocoon-form-
encoding".

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org