How to Fix Jenkins Console Log Encoding Issue on Windows
If you get alien characters in console log of your job like this:
Then you have a problem with Java file encoding issue. Refer to this thread on StackOverflow, you need to add java argument
-Dfile.encoding=UTF8 when running Jenkins with java command.
But in Windows, this is not straightforward when you install Jenkins as a Windows services.
Windows Service Wrapper
To run Java application as a Windows service, you cannot run it directly using java command but you need a wrapper. Jenkins uses WinSW as a services wrapper to run java and jenkins.war.
Per its documentation, you can specify Java argument in the XML config file i.e.
jenkins.xml, like this:
Now, you can see nicely character in console log. Cheers!
Jenkins: console output characters
Does anyone know how to beat such chars in Jenkins console output log? Seems there is a problem with UTF-8.
winsw - A wrapper executable that can be used to host any executable as an Windows service, in a liberal license