Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20974

Bamboo doesn't handle command output in encoding different than UTF-8 well

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 9.2.18, 9.6.6, 10.0.1
    • 6.10.6
    • Logs
    • None

      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

      1. Create a build with a script task
      2. 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
      3. 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) {
             // write your code here
              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

          Form Name

            [BAM-20974] Bamboo doesn't handle command output in encoding different than UTF-8 well

              mgardias Marcin Gardias
              mgardias Marcin Gardias
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: