Cyrillic symbols in the Console output are not displayed correctly.
Jenkins is running through Tomcat / 8.5.11 on Windows 7
The Jenkins property displays:
file.encoding Cp1251
sun.jnu.encoding Cp1251
sun.stderr.encoding cp866
sun.stdout.encoding cp866
How can I set the encoding on UTF-8 in Jenkins? Encoding in autotest code is UTF-8.
It is example problem in Cyrillic text
_максимум_информации
Click Tools, then select Web options. Go to the Encoding tab. In the dropdown for Save this document as: choose Unicode (UTF-8). Click Ok.
UTF-16 binary encoding Recall that UTF-8 encodes each ASCII character in just one byte. UTF-16 must encode these same characters in either two or four bytes. This means that an English text file encoded with UTF-16 would be at least double the size of the same file encoded with UTF-8.
UTF-8 is the dominant encoding for the World Wide Web (and internet technologies), accounting for 98.0% of all web pages, and up to 100.0% for many languages, as of 2022.
UTF-8 is a character encoding system. It lets you represent characters as ASCII text, while still allowing for international characters, such as Chinese characters. As of the mid 2020s, UTF-8 is one of the most popular encoding systems.
According to this answer: JVM property -Dfile.encoding=UTF8 or UTF-8?
You have to add this JVM setting to your Jenkins starting script (JAVA_TOOLS_OPTIONS):
-Dfile.encoding=UTF8
I created file setenv.bat in bin folder and set JAVA_OPTS="-Dfile.encoding=UTF-8"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With