In the Startup/Connection panel of the run/debug configuration dialog box,
check Pass environment variables.
and add an environment variable,
Name fills in JAVA_TOOL_OPTIONS , Value fill in -Dfile.encoding=UTF-8.
# #Click OK. Restart TOMCAT for debugging. This set of procedures perfectly solves the problem of garbled characters.The above is the detailed content of Solution to garbled code when starting TOMCAT html in idea. For more information, please follow other related articles on the PHP Chinese website!