Scenario: I have MYSQL having default as UTF-8. Same is the case with my HTML and JSP pages,they all have UTF-8 as their standard. If I keep the form method as:
form action = "reg" method = "post" accept-charset = " ISO-8859-1,utf-8;q=0.5" enctype = "application/x-www-form-urlencoded" name = "form1" id="form1"
^-------- It works
IF form action = "reg" method = "post" accept-charset=" ISO-8859-1" enctype="application/x-www-form-urlencoded" name="form1" id="form1"
^--------------It works
If form action = "reg" method = "post" accept-charset = "utf-8" enctype = "application/x-www-form-urlencoded" name = "form1" id= "form1" ^-------It doesn't work and instead wildcard like characters are displayed.
PROBLEM STATEMENT: When I redirect HTML page to JSP page and use <% out.println( request.getParameter("name"));%> It displays correctly : جنید
But, when I use String xx=request.getParameter("name"); and then display the string it displays : ج ; ن ;ی ;د ;
so, except for hard-code, I am not able to put urdu in my database.
I need a solution for: Taking user input from HTML form in URDU e.g: جنید and inserting the same جنید in the database and not ج ;ن ;ی ;د ; which also corresponds to جنید