In the URL does not support the Chinese transmission, before the transmission needs the URI code, after the client code, transmits to the service side, needs to decode, the encoding and decoding format needs to unify.
Browsers and servers generally have a default encoding, which is automatically encoded and decoded when the Chinese is passed.
For example, the default encoding of the browser is UTF-8, the server-side default encoding is GB2312, when the parameters are passed to the service side, there is garbled.
In the Web development requires a uniform encoding, to avoid the problem of Chinese garbled.
The client can be encoded by JS, JS encoding format can only be utf-8, the server can set the default decoding format. add uriencoding= "UTF-8" to Server.xml when using the Tomcat container on the server
/apache-tomcat-7.0.61/conf/server.xml
<connector port= "8080" protocol= "http/1.1"
connectiontimeout= "20000"
Redirectport= "8443"
uriencoding= "UTF-8"/>
Reference article:
Front-end engineer code Skirmish http://ued.taobao.org/blog/2011/08/encode-war/
Character garbled in URL parameter with Chinese