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

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -