The form is submitted by get, the method of solving garbled characters is: mode one: manual decoding param = new String (param.getbytes ("iso8859-1"), "Utf-8"); This way, relying on server mode two: Configure Tomcat to modify Tomcat's server.xml:uriencoding= "Utf-8" this way, relying on server way three: URL encoding (not dependent on Tomcat configuration,Recommended): URL encoding two times in the browser. var param = "Medium"; param = encodeURI (param); alert (param); param = encodeURI (param); alert (param); Speaking param encoding two times after the delivery to the background server itself again to do URL decoding. When the parameters are passed to the server, the server will decode the parameters automatically once, we only need to decode the java.net.URLDecoder.decode manually (param, "utf-8"); java.net.Urldecoder. Decode (param, "utf-8"); URL decoding java.net.Urlencoder. Encode (param, "utf-8"); URL encoding
The Chinese garbled problem of GET request in Java