You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bertrand Delacretaz <bd...@codeconsult.ch> on 2003/06/04 09:24:55 UTC

Fwd: jfor encoding problem (POST encoding problem, indeed)

Hi Charlene,

> ....using the Orderpage example at 
> http://localhost:8080/cocoon/samples/stream/order.  If you add <?xml 
> version="1.0" encoding="ISO-8859-1"?> at the top of the default xml 
> and change Order Id to be Gérer, the next html page will display 
> <OrderID>Gérer </OrderID> as Order Id....

This has nothing to do with jfor - in your scenario, Cocoon's 
StreamGenerator is used to read your XML from an HTML form field.

Your encoding problem is caused by the StreamGenerator using the wrong 
encoding when *reading data* from the form's POST request. To use a 
different encoding, you have to change the HTML code of the form, 
replacing

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

   with

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

for example.

The encoding declaration that you used in the XML input field is 
probably handled correctly later on, but it's too late as the 
StreamGenerator has already read the data with the wrong encoding.

Hope this helps,
-Bertrand

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