Use of Hindi (unicode) character from request parameter in java

String str = request.getParameter("sentence");
System.out.println("before convert - " + str);
str = new String(request.getParameter("sentence").getBytes("ISO-8859-1"),"UTF-8");
System.out.println("after convert - " + str);

Leave a Reply

Your email address will not be published.