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 25594] - [PATCH] StreamGenerator can't handle multipart request parameters correctly
Date Mon, 11 Jul 2005 09:21:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=25594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=25594





------- Additional Comments From jbazeley@bloomberg.com  2005-07-11 11:21 -------
(In reply to comment #2)
> It seems like patch for bug 25594 (from version 2.1.5.1) makes StreamGenerator
> to lose form character encodings. Special characters (i.e. äöå) in a form
> encoded in utf-8 read in using StreamGenerator get messed up. Code works and is
> tested on Cocoon 2.1.4, but when migrating to 2.1.7 this came up. Building
> Cocoon with the old java-file “solves” the problem.
> 
> Configuration:
> -cocoon 2.1.7
> -run on jetty-4.2.22
> -web.xml:
> -container-encoding: ISO-8859-1
> -form-encoding: UTF-8
> -tested generator with different defaultContentType parameters
> 
> -the original message: <surname>Ööliä läikkyy</surname>
> -url-encoded utf-8 message the server receives:
> %3Csurname%3E%C3%96%C3%B6li%C3%A4+l%C3%A4ikkyy%3C%2Fsurname%3E
> -what we get: <surname>Ã&#150;öliä läikkyy</surname> 

Hi, this bug can be fixed by changing the line (around 119)
xmlReader = new InputStreamReader(((Part)xmlObject).getInputStream());
to 
xmlReader = new InputStreamReader(((Part)xmlObject).getInputStream(),"UTF-8");

where UTF-8 is your chosen encoding.

Don't know cocoon sources at all, but would appear to be fixable by either:
(1) grabbing the form-encoding param from web.xml (if generators can do this)
(2) a new parameter 'encoding' in the same way the serialisers do.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message