cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: form-validation and utf-8
Date Fri, 05 Apr 2002 14:25:28 GMT
> From: Montier Patrick [mailto:patrick.montier@easance.com]
> 
> Thank you for the response but how to change the encoding of the
servlet
> container ?
> that is what i want to do !

Two options:
1. UNIX: LOCALE=...
   Win: Control Panel - Regional Options - Locale

2. For Sun JVM, this is -Dfile.encoding option (I might be wrong
though...)

Also, you have third option - it was here on the list recently - you
need to set encoding of the request object before invoking action
(setCharacterEncoding method).

Vadim

> 
> Best regards
> 
> Patrick
> 
> >>IIRC, form validator works on encoding of the servlet container. You
> >>>have two options:
> >>1. Patch form validator
> >>2. Change encoding of the servlet container
> 
> 
> 
> 
> 
> > Hi,
> 
> Patrick,
> 
> > I can't resolve my problem : i try to make the form-validation works
> with
> > utf-8 data, it only works with Iso-????
> 
> 
> > In my sitemap.xmap, i try the form-encoding as described in an email
> but
> > it's still the same, when login or password input is in Utf-8
> caracters, the
> > form-validator reject.
> >
> >
> >      <map:match pattern="asp*/*/do-login">
> >         <!-- first validate whether submitted values are ok -->
> >         <map:act type="form-validator">
> >           <map:parameter name="descriptor"
> > value="context://test/descriptors/params.xml"/>
> >           <map:parameter name="validate" value="login,password"
> > form-encoding="UTF-8"/>
> 
> This (form-encoding attribute) is *not* valid syntax for parameter.
> Parameter element understands *only* name and value attributes.
> 
> Vadim
> 
> >           <!-- now try to log in -->
> >           <map:act type="db-authenticator">
> >             <map:parameter name="descriptor"
> > value="context://test/descriptors/auth.xml"/>
> >             <!-- now go to protected area -->
> >             <map:redirect-to uri="login_ok.htm"/>
> >           </map:act>
> >         </map:act>
> >         <!-- something was wrong, try it again -->
> >         <map:redirect-to uri="login_nok.htm"/>
> >       </map:match>
> >
> > Any idea ?
> >
> > Thanks
> >
> > Patrick


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message