Solve the console garbled problem after Tomcat is started

The console log is garbled when Tomcat is running


problem : After Tomcat is started, all Chinese characters in the console are garbled
Insert picture description here
solution: Find the Tomcat installation directory conffolder logging.propertiesfile, use Notepad to open it
Insert picture description here
probably can see the following code in the first 20 rows will be UTF-8modified to GBKencode
Insert picture description here
Save and close and restart Tomcat server, Chinese characters can be displayed correctly
Insert picture description here
change After character encoding,The log information of Tomcat in eclipse and IDEA can display Chinese characters normally without any accident

If the program prints garbled characters, please set a uniform character encoding in the program to solve it

If you have any questions, please comment, private message, and answer in time. Learn together and make progress together

Guess you like

Origin blog.csdn.net/weixin_44580492/article/details/106358111