cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18528] - form-validator incorrectly counts string lenght when multibyte characters
Date Tue, 01 Apr 2003 14:46:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18528>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18528

form-validator incorrectly counts string lenght when multibyte characters

vgritsenko@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From vgritsenko@apache.org  2003-04-01 14:46 -------
Form validator action works with string parameters, thus length of the string is
always 2 if input is two any-byte (1, 2, or 3 byte) letters.

If length is not really 2, then this is problem not with validator but with the
way how you decoded your request. As you noticed already, you have to decode
request properly - using the proper encoding.

If you always expect only one encoding, then set form-encoding init parameter.
CocoonServlet also supports setting form encoding via 'cocoon-form-encoding'
form parameter, which overrides init parameter.

request.setCharacterEncoding() also should work. Usually one set this using
SetCharacterEncodingAction action as the first sitemap instruction.

Mime
View raw message