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

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

            Patryk Makuch made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Marcin Gardias made changes -
            Status Original: In Review [ 10051 ] New: Waiting for Release [ 12075 ]
            Marcin Gardias made changes -
            Fix Version/s New: 9.6.6 [ 108839 ]
            Fix Version/s New: 9.2.18 [ 108838 ]
            Fix Version/s New: 10.0.1 [ 109291 ]
            Marcin Gardias made changes -
            Status Original: In Progress [ 3 ] New: In Review [ 10051 ]
            Marcin Gardias made changes -
            Status Original: Gathering Impact [ 12072 ] New: In Progress [ 3 ]
            Marcin Gardias made changes -
            Assignee New: Marcin Gardias [ mgardias ]
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 3
            SET Analytics Bot made changes -
            UIS Original: 3 New: 0
            SET Analytics Bot made changes -
            UIS Original: 1 New: 3
            SET Analytics Bot made changes -
            UIS Original: 2 New: 1

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

                Created:
                Updated:
                Resolved: