I've encountered some issues while using Jenkins and would like to seek your assistance. The specific problem is as follows:
I have already tried using -Dsun.jnu.encoding=utf-8
, but unfortunately, it didn't have the intended effect. I've thoroughly checked, and the Linux locale is already set to en_US UTF-8
. However, the systemInfo
in Jenkins consistently displays as ANSI_X3.4-1968
, which has left me quite puzzled. Currently, my hypothesis is that Jenkins might be overwriting this property setting, although I'm uncertain about the exact reasons behind it. I'm hoping you could provide clarity to my confusion. Thank you very much.
Jenkins user locale information
The following is the version information:
java: java 17.0.8 maven: Apache Maven 3.8.5 Jenkins: Jenkins 2.414.1
Use the following command to add java properties, but doesn't work.
sudo systemctl edit jenkins.service
ANSI_X3.4-1968
causes some characters to be garbled, but through the following methods, it can be temporarily solved, but the root cause is still not found
environment {
LC_ALL = 'en_US.UTF-8'
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
}