cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petteri Sulonen <Petteri.Sulo...@avaintec.com>
Subject Stream generator encoding problem with Cocoon 2.1.11
Date Wed, 18 Mar 2009 13:50:03 GMT
I'm in the process of moving a large Cocoon application from Cocoon 
2.1.4 to 2.1.11 (LTTP, I know).

* Platform: Ubuntu, Java 5, Jetty 6.1.15.
* In web.xml, container-encoding set to ISO-8859-1, form-encoding UTF-8.

Problem: when I POST form data to a stream generator, it behaves as if 
the data was encoded in ISO-8859-1, even though it's encoded in UTF-8 as 
intended (e.g. umlauted characters come back as two letters).

However, when I bounce back the data using the request generator, the 
encodings work as intended.

This worked fine on 2.1.4.

This borks the encodings:

      <map:match pattern="stream.xml">
        <map:generate type="stream">
          <map:parameter name="form-name" value="message"/>
        </map:generate>
        <map:serialize type="xml"/>
      </map:match>

This doesn't bork them (but obviously I don't get the data as a SAX 
stream, which is what I want):

      <map:match pattern="request.xml">
        <map:generate type="request"/>
        <map:serialize type="xml"/>
      </map:match>
      
Input data is the same in both cases.

On the client side, I'm dealing with two situations, regular POST 
requests done via HTML forms, and dojo.xhrPost requests. (Currently 
using Dojo 1.0.2, intending to migrate to Dojo 1.2 or 1.3 in the near 
future), so I would much prefer a server-side solution if one is available.

Any help would be much appreciated.

/Petteri Sulonen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message