Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31096

Unicode characters in console logs do not print correctly in Workflow builds

    XMLWordPrintable

Details

    Description

      On my production Jenkins system, Workflow jobs which run a shell script that happens to print Unicode characters instead display the null/question mark placeholder in the console log view. The same shell script, run by a freestyle job, prints correctly. I can't reproduce this on my test Jenkins server, so I suspect this is partly an environment issue, but I don't know what to check to confirm that and it's interesting that it only impacts Workflow jobs.

      Workflow script which reproduces this:
      node {
      sh 'env printf "\u2024 \u2024 \u2024 \u2024 \u2024 \n"'
      }

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            marslo this issue is about Pipeline, so please do not comment on issues affecting freestyle builds.

            jglick Jesse Glick added a comment - marslo this issue is about Pipeline, so please do not comment on issues affecting freestyle builds.

            I have exactly the same issue as owenmehegan. Production won't show Unicode characters correctly, development does.

            I tried the workaround mentioned: adding -Dfile.encoding=UTF-8 as well as -Dsun.jnu.encoding=utf-8 to JENKINS_JAVA_OPTIONS under /etc/sysconfig/jenkins (Using RedHat systems here), but it didn't work. (I did confirm that the options were updated by looking at <JENKINS_URL>/systemInfo)

            The only difference I can see is that the development master is RHEL 6 and the production uses RHEL 7.

            The output is given by a python module which is run using the PyEnv plugin.

            Any other workarounds in the meantime?

            tsvi Tsvi Mostovicz added a comment - I have exactly the same issue as owenmehegan . Production won't show Unicode characters correctly, development does. I tried the workaround mentioned: adding -Dfile.encoding=UTF-8 as well as -Dsun.jnu.encoding=utf-8 to JENKINS_JAVA_OPTIONS under /etc/sysconfig/jenkins (Using RedHat systems here), but it didn't work. (I did confirm that the options were updated by looking at <JENKINS_URL>/systemInfo) The only difference I can see is that the development master is RHEL 6 and the production uses RHEL 7. The output is given by a python module which is run using the PyEnv plugin. Any other workarounds in the meantime?
            jglick Jesse Glick added a comment -

            Relevant PRs have been brought up to date once again.

            jglick Jesse Glick added a comment - Relevant PRs have been brought up to date once again.
            jglick Jesse Glick added a comment -

            JENKINS-48923 proposes an analogous change to Jenkins overall.

            jglick Jesse Glick added a comment - JENKINS-48923 proposes an analogous change to Jenkins overall.
            jglick Jesse Glick added a comment -

            Released. Please check the plugin wikis for changelog information—it is important to update all four affected plugins.

            jglick Jesse Glick added a comment - Released. Please check the plugin wikis for changelog information—it is important to update all four affected plugins.

            People

              jglick Jesse Glick
              owenmehegan Owen Mehegan
              Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: