jsp - Prevent non-US Letters in Form Submit (java) -


i have java jsp/servlet application in tomcat, , fronted apache.

the server side checks make sure letters in ranges [a..z][a..z], digits, , punctuation symbols accepted.

however, when a, example, chinese character entered, value in server-side looks '&#5960".

hence, far server-side concerned, these valid punctuation symbols , digits.

any pointers can help? driving me insane after 10 coding marathon.

you can use apache commons stringescapeutils.unescapehtml() in java.

unescapehtml(string str) 

does following:

unescapes string containing entity escapes string containing actual unicode characters corresponding escapes.


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -