1.  it a little less understandable, and performance might also be a little
worse affected due to the "replace" of strings ?
------U R right.
2. Moreover, the function "escape" seems incompatible
 with different browsers.
------ I think it works for IE and netscape not sure about others?

> 3, How will it behave if "%" is included in the input string?
------ I am sorry actual code was like this
        theESCString=escape(document.form1.text1.value);
        theESCString=theESCString.replace(/%u\w{4}/g,"**");
        theESCString=theESCString.replace(/%\w{2}/g,"*");
> 4, In a word, your posted problem is not so simple
>  as is originally imagined, isn't it?
------- Which all case will ie fail? Is it OK if I use the method proposed
by U? i.e. checking for ASCII value (>127)?

Actually my intention was to give a client side error message when user
tries to enter more than specified length in an HTML field. The fields take
japanese & english literals.

Thanks for helping in understanding the complexity of the problem.
regards - Ranjan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to