I see... I'm not sure if you speak German, if so try this link: http://de.selfhtml.org/html/formulare/definieren.htm#zeichenkodierung
If not ty to play with the accept-charset attribe of the form tag. The source of a encoding problem is hard to find this is only blind shot: Try to add accept-charset="utf-8" to the form tag. If this is not working use firebug or IE Developer tools to look at the post headers and params and make sure it contains utf-8 and a correctly encoded version of you special chars. If this is all correct and the problem still exists read this: http://www.stripesframework.org/display/stripes/Localization#Localization-DeterminingtheCharacterEncodingtouse On Tue, Feb 9, 2010 at 12:37 PM, Ajay Thukral <[email protected]> wrote: > Hi Richard, > > I want to pass special characters as input from the browser.I want to enter > these characters in the textbox generated using the stripes:text tag in jsp > and then validate the input in the action Bean. > > If the entered string is "hÇÄ" what I receive in action Bean (java class ) is > "hC?A?". while checking the char encoding by > getContext().getRequest().getCharacterEncoding()) in java class ,it is also > utf-8. > > What else needs to be done so that I can get the same string as input from > browser (jsp ) in actionBean for special characters like " ( û,ü,Ý,ý,Þ,þ,ß,ÿ > )" > > Regards > Ajay > > -----Original Message----- > From: Richard Hauswald [mailto:[email protected]] > Sent: Tuesday, February 09, 2010 3:42 PM > To: Stripes Users List > Subject: Re: [Stripes-users] Issue with special charcters stripes 1.4.2 > > Hi, > can you tell us what you want to do? I'm asking cause I don't > understand why you're using the mask validation. Generally, if you > encounter problems with default validation annotation try to use > > @ValidationMethod > public void validateStuff(ValidationErrors errors) { > boolean isValid = ... > if(!isValid) > errors.add(fieldname, new SimpleError("The value is invalid")); > } > > Regards, > Richard > > On Tue, Feb 9, 2010 at 6:38 AM, Ajay Thukral <[email protected]> wrote: >> >> >> Hi, >> >> We are facing an issue while using the special characters like Ç Ä i.e 2 >> byte characters as input. >> I want to enter these characters in the stripes:text box in jsp and then >> validate the input using the @validate annotation in the action Bean. >> >> @Validate(field = " billcity", mask = >> "[[\u00DC\u00D6\u00C4\u00DF\u00E4\u00F6\u00FC\u00C0\u00E0\u00C2\u00E2\u00E7\u00C7\u00C8\u00E8\u00C9\u00E9\u00CA\u00EA\u00CB\u00EB\u00CE\u00EE\u00CF\u00EF\u00D4\u00F4\u00D9\u00F9\u00DB\u00FB\u00C6\u00E6\u0152\u0153]\\w,\\s-/+%(.)//&;#]+", >> on = "saveMethod"), >> >> The mask method is not validating the input even if the regular expression >> is correct and the input matches it. >> >> The problem seems is that if I enter string as "45is+%()&hÇÄ" what I >> receive in action Bean (java class ) is "45is+%()&hC?A?". I can see it by >> printing i.e System.out.println(getBillcity()). >> >> I have also checked the requestCharEncoding >> (getContext().getRequest().getCharacterEncoding()) in java class and it is >> also utf-8. >> >> jsp : >> I have a jsp mentioned encoding as utf-8 in at the following points: >> <%@ page contentType="text/html;charset=UTF-8" language="java" %> >> ..... >> .... >> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> >> ..... >> .... >> >> <stripes:form id="viewInfoForm" action="/UserManager.action" method="post" >> name="InfoForm" enctype="UTF-8"> >> ..... >> .... >> >> >> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> Stripes-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/stripes-users >> > > > > -- > Richard Hauswald > Blog: http://tnfstacc.blogspot.com/ > LinkedIn: http://www.linkedin.com/in/richardhauswald > Xing: http://www.xing.com/profile/Richard_Hauswald > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > -- Richard Hauswald Blog: http://tnfstacc.blogspot.com/ LinkedIn: http://www.linkedin.com/in/richardhauswald Xing: http://www.xing.com/profile/Richard_Hauswald ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
