cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 5593] New: - [PATCH] Form encoding enhancement.
Date Thu, 27 Dec 2001 02:05:52 GMT
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


Mime
View raw message