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 http://wiki.apache.org/cocoon/RequestParameterEncoding ? It might give some answers.
-Bertrand
Hello,
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.
Solution: In CocoonServlet.java around line 1040 insert // set encoding before parameters are accessed request.setCharacterEncoding(this.containerEncoding); before // Get the cocoon engine instance getCocoon(request.getPathInfo(), request.getParameter(Constants.RELOAD_PARAM));
Hope someone needs it and it is not too dirty ;-) Stefan.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]