Issue Summary
If a command outputs something to stdout in encoding different than UTF-8, Bamboo won't display it correctly in the log page.
Steps to Reproduce
- Create a build with a script task
- As a part of the task run command that outputs non-UTF-8 string, with special characters to stdout, for instance java program shown below run with `-Dfile.encoding=windows-1257` java command line switch
- Repeat running Bamboo with the same encoding option: it will still fail.
package com.company;
import java.nio.charset.Charset;
public class Main {
public static void main(String[] args) {
System.out.println("ĄČĘĖĮŠŲŪ");
}
}
Expected Results
If Bamboo is run with encoding set to command encoding, logs should be displayed correctly
Actual Results
Log handling is hard coded as UTF-8, but command output will be handled according to file.encoding option resulting in incorrectly displayed logs (??? instead of actual characters)
Workaround
In order to see the stdout output:
- set Bamboo character encoding to match the command's encoding (using `-Dfile.encoding' JVM parameter)
- in the log page, click on the view link (at this point the command output will still be mangled)
- switch the page's character encoding in the browser options to view the command output