cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefan pickschneider <>
Subject Re: Encoding Problem: File Upload and UTF-8
Date Sun, 06 Mar 2005 19:46:04 GMT
Bertrand Delacretaz wrote:
> Le 5 mars 05, à 15:17, stefan pickschneider a écrit :
>> ..we have a problem with the encoding, cforms and file uploads.
> Did you look at ?
> It might give some answers.
> -Bertrand


thanks for your suggestion - it helped me to find a "solution".

It seems that the cocoon servlet initializes the container-encoding for 
the request too late, so that the default encoding iso-8859-1 is used 
for reading the parameters. These are incorrectly decoded, since 
container-encoding and form-encoding are set to UTF-8 in web.xml.
All forms etc. are UTF-8, too.
This problem only happens if you're using "application/x-www-
form-urlencoded" as enctype. For "multipart/form-data" it works, because
MultipartHttpServletRequest doesn't try to decode parameters.

In around line 1040 insert
         // set encoding before parameters are accessed
	// Get the cocoon engine instance

Hope someone needs it and it is not too dirty ;-)

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

View raw message