JSP + Servlet + multipart/form-data form UTF-8

how to character set utf-8 in upload file and value ?

request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8"); 
response.setContentType("text/html;charset=UTF-8");
MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
out.print("NAME iS: " + mrequest.getParameter("name"));

output:

بÙاخبÛتاخح


Source: jsp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.