Java solves the problem that byte 2 of UTF-8 sequence with exception 2 bytes is invalid
•
Java
Java solves the problem that byte 2 of UTF-8 sequence with exception 2 bytes is invalid
In a recent project, I encountered the problem that byte 2 of the abnormal 2-byte UTF-8 sequence is invalid. I found the information on the Internet and recorded the solutions here. If you encounter the same problem, you can have a look
Detailed exception:
resolvent:
There is a file Catalina in the bin directory of Tomcat bat
Find this line: set Java_ OPTS=%JAVA_ OPTS% %LOGGING_ CONfig%
Add: set Java on the line above it_ OPTS=-server -Dfile. encoding=utf-8
Thank you for reading, hope to help you, thank you for your support to this site!
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
二维码