So If you validate this stuff with a custom validation method it works? On Wed, Feb 10, 2010 at 8:11 AM, AjayThukral <[email protected]> wrote: > > We already have following encoding at jsp > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta> . > And Whatever special charcteres we are passing , we need to validate it at > stripes action bean. If we do not validate and save those special charecters > into databse, things are fine. But moment we try to validate input (containg > special charcters) using @validate annotation using mask or using custom > validation method , our special charcters e.g hÇÄ" is getting changed to > "hC?A?". > > We have checked header encoding in firebug and it is UTF-8. > > Any pointers > > > ******************* > > Newman, John W wrote: >> >> Character encoding hell can be tough to get out of sometimes. You need to >> step through and verify UTF8 one layer at a time like Richard suggested. >> Firebug is extremely useful here. >> >> Do you have >> >> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta> >> >> at the top the top of the page? >> >> >> >> -----Original Message----- >> From: Iwao AVE! [mailto:[email protected]] >> Sent: Tuesday, February 09, 2010 8:27 AM >> To: Stripes Users List >> Subject: Re: [Stripes-users] Issue with special charcters stripes 1.4.2 >> framework >> >> Hi, >> >> I see a space character in the field attribute of your @Validation >> annotation. >> Please make sure it doesn't exist in your actual action bean. >> >> Using System.out for debugging utf-8 characters is not a good idea. >> I would recommend using some kind of logging framework >> (commons-loggin, log4j, etc.) that can be configured to output utf-8. >> >> Regards, >> Iwao >> >> on 10/02/09 14:40 AjayThukral said the following: >>> >>> 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 >> ------------------------------------------------------------------------------ >> 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 >> >> > > -- > View this message in context: > http://old.nabble.com/Issue-with-special-charcters-stripes-1.4.2-framework-tp27510554p27526877.html > Sent from the stripes-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > 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 ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
