On Tue, Sep 09, 2003 at 03:19:17PM +0200, Bruno Dumon wrote:
> On Tue, 2003-09-09 at 15:09, Leszek Gawron wrote:
> > On Tue, Sep 09, 2003 at 02:35:10PM +0200, Bruno Dumon wrote:
> > I think this couldn't work as the Cocoon FOM when
> > cocoon.request.getParameter( "test" ) is issued does
> > request.getParameter( "test" );
> >
> > while the xsp-request logicsheet performs encoding translation:
> >
> > public static String getParameter(Map objectModel, String name,
> > String defaultValue, String form_encoding,
> > String container_encoding) {
> > if(container_encoding == null)
> > container_encoding = "ISO-8859-1"; // default per Servlet spec
> >
> > Request request = ObjectModelHelper.getRequest(objectModel);
> > String value = request.getParameter(name);
> > if(form_encoding != null && value != null && value.length() > 0) {
> > try {
> > value = new String(value.getBytes(container_encoding),
> > form_encoding);
> > } catch(java.io.UnsupportedEncodingException uee) {
> > throw new CascadingRuntimeException("Unsupported Encoding
> > Exception", uee);
> > }
> > }
> >
> > if (value == null) {
> > value = defaultValue;
> > }
> >
> > return value;
> > }
>
> This translation is also part of the Cocoon Http Request object wrapper,
> and will be activated if you either set the relevant parameters in the
> web.xml or use the SetCharacterEncodingAction
I have found the problem!! :)
cocoon.request.getParameter( "test" ) returns proper string with national
characters
while cocoon.request.get( "test" ) does not !
LG
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ [EMAIL PROTECTED] _\\()//_
.'/()\'. Phone: +48(501)720812 / // \\ \
\\ // recursive: adj; see recursive | \__/ |