Chinese garbled code of jar package compiled by macos

A Java project, after being packed into a jar package through maven, is run on a Linux server. What are all the Chinese garbled codes in the log? But there is no problem with the same jar package running on macos The same code, compiled on Windows and run on Linux, will not garble. I don"t know where the coding is wrong.

Jan.03,2022

it is estimated that it doesn't have much to do with the jar package. It may be due to the configuration of your Linux machine

run the following instructions

$ locale

see what's returned. Change it to
LANG=zh_CN.UTF-8
and try

again.

have you solved it? My server shows LANG=zh_CN.UTF-8 and garbled

Menu