cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MIYABE Tatsuhiko" <>
Subject Request parameters problem
Date Thu, 20 Dec 2001 23:54:37 GMT
Now, I'm developing web application using Cocoon2.
But I came up against some problems in relation to Japanese language
Yesterday, I considered how to solve them fundamentally.

Servlet2.2 has problems about charactor encoding of HTTP request,
therefore We decode multibyte text with following code compulsory.

	String value = request.getParameter("foo");
	byte[] bytes = value.getBytes("ISO-8859-1");//Encode in servlet container
	value = new String(bytes, "Shift_JIS");//Decode in national encoding.

Servlet2.3 solved problems by adding setCharacterEncoding into
By the way,Cocoon2 has some components that using request parameters.
If I'll develop patches for multibyte text, then I must write the above
codes for reason of Cocoon2 build with Servlet2.2.
I think,these deformities should solve in
One of a solution is adding this method for the Request.It likes Servlet2.2.
But it is a enhancement for Cocoon2 for solving Servlet2.2's problem.(not

	setCharacterEncoding(String form_encoding);

Components should use this method when accessing request parameters.
And may be necessary following method.

	setContainerEncoding(String container_encoding);

However,I think that container_encoding should be contained application
configuration(cocoon.xconf) instead of above method.

For example:
		<parameter name="container-encoding" value="Shift_JIS"/>

I want to learn developers opinions.

MIYABE Tatsuhiko
Osaka, Japan.

To unsubscribe, e-mail:
For additional commands, email:

View raw message