• 本教程方法理论可解决tomcat所有的乱码问题,包括idea控制台,tomcat日志,webjs等一系列乱码问题

IDEA

  1. Settings - File Encodings

  2. bin - idea.exe.vmoptions

    1
    -Dfile.encoding=UTF-8
  3. bin - idea64.exe.vmoptions

    1
    -Dfile.encoding=UTF-8

tomcat

  1. bin - catalina.bat

    1
    set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%  -Dfile.encoding=UTF-8" 
  2. conf - logging.properties

    1
    java.util.logging.ConsoleHandler.encoding = UTF-8
  3. conf - server.xml

    1
    2
    3
    <Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" URIEncoding="UTF-8" />

经过以上设置如果还是乱码的话,听天由命吧….