In the Startup/Connection panel of the Run/debug configuration dialog,

Check Pass Environment Variables.

And add an environment variable,

Set Name to JAVA_TOOL_OPTIONS and Value to -dfile. encoding=UTF-8.

 

 

Click OK. Restart TOMCAT for debugging.

This process is perfect to solve the problem of garbled code.