1. Request
1.get
1.1 Submit the form in the get method,
and re-encode the received parameters:
String str = new String(str.getBytes("ISO-8859-1"),"UTF-8");
1.2 URL splicing parameters, browser method:
The front-end and back-end of the project are separated, the front-end submits data through the interface, receives it as garbled code, gets submitted, and the parameters are translated by HTTP
URLDecoder.decode(str,"UTF-8")
Blog reference:
Summary of methods for solving Chinese garbled characters in Java Web projects
HttpServletRequest