cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volkm@r" <>
Subject Re: From Unicode to Form and back again
Date Tue, 07 Sep 2004 11:51:48 GMT
Huber, Daniel wrote:
>>>I currently build "plain" HTML forms out of given XML files.
>>>As well as the other way round: I save the user input from 
>>>these forms back to XML file.
>>>This behaviour seems to be quite independent of the 
>>>form-encoding used for RequestGenerator (ISO-8859-1 or UTF-8).
>>>Is there a way to prevent the conversion into entities, but always
>>>generate UTF-8 encoding?
>>>Has anybody out there tried to allow unicode characters in 
>>>HTML forms?
>>Use set-encoding action in your pipeline:
>>   <map:pipeline>
>>     <map:act type="set-encoding">
>>       <map:parameter name="form-encoding" value="utf-8"/>
>>     </map:act>
>>     ....
>>   </map:pipeline>
> Sorry, this will convert all characters which used to be correct into '?'. (e.g. 'äöü'=>'???')
> This is quite weired, because I already used:
>    <map:generator label="content" name="request" ... src="org.apache.cocoon.generation.RequestGenerator">
>       <form-encoding>UTF-8</form-encoding>
>    </map:generator>
> ... so I didn't really expected a change.
> It really seems that I got more than one configuration wrong...
> Regards,
> Daniel
You may check it with a more simplified form
in a simplified pipeline.

     <map:act type="set-encoding">
       <map:parameter name="form-encoding" value="utf-8"/>

     <map:match pattern="myform.html">
       <map:generate src="dummy.html"/>
       <map:transform src="testform.xsl"/>
       <map:serialize type="html"/>

Any Unicode characters like ★♩♪♫♬ should work.

Volkmar W. Pogatzki

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

View raw message