JSP: how to read unicode from forms

Are you having encoding problems while trying to read multilingual data from a JSP form? That is because JSP by default is trying to interpret your input as ISO-8859-1. That’s fine unless you have a form that sendsUTF-8.

The problem can be eliminated by simply adding the following line of before you do any calls to getParameter():

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *