JAVA Chinese garbled code

1. In MyEclipse, you can set the file encoding format, but when we use scanner to type, because Windows uses GBK encoding, if the set encoding format is not GBK, Chinese garbled code will appear.

2. When the foreground page sends a request to the background, if it is in get mode, it will be sent in iso8859-1 format by default, and Chinese garbled code will also appear.

3. For both cases, you can use the following code to solve them

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>