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

MSBuild Output encoding vs Jenkins' encoding vs Browser Encoding

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Trivial
    • Resolution: Done
    • Labels:
      None
    • Environment:
      Win8 in French, Jenkins ver. 1.574, Chrome Version 37.0.2062.58 beta-m
    • Similar Issues:

      Description

      When using Jenkins with MSBuild/MSTests, the output console and the plain text have encoding issues.

      My OS is in French, so we use accents, which are not well displayed in Jenkins' MSBuild/MSTest output (see last line in the enclosed screenshot ; the word "Génération" became "G,n,ration")

      The MS CMD output is said to be encoded in CP 850.

      My Jenkins/SystemInfo, regarding encoding says :
      file.encoding Cp1252
      file.encoding.pkg sun.io
      sun.io.unicode.encoding UnicodeLittle
      sun.java.command C:\Program Files (x86)\Jenkins\jenkins.war --httpPort=8082 --ajp13Port=-1 -Dfile.encoding=UTF-8
      sun.jnu.encoding Cp1252

      I tried to use the "-Dfile.encoding=" argument with "UTF8","UTF-8", "Cp850" "ISO8859_1" but without any luck.

      I guess as long as there will be differences between MSDOS/MSBuild's encoding and Jenkins' encoding, I won't be able to have proper outputs.

        Attachments

          Activity

          Hide
          marshall777 Lionel Cabasson added a comment -

          Provided by chichimotsu in PR #29 and included in release 1.27

          Show
          marshall777 Lionel Cabasson added a comment - Provided by chichimotsu in PR #29 and included in release 1.27
          Hide
          rakekniven rake kniven added a comment -

          Hello,

          does the new chcp call has any impact on binary build output? Will my exe differ after calling chcp?
          I have a Delphi build slave and it omplains about not finding chcp command. I know how to fix this and thought about any side effects.

          Cheers

          Show
          rakekniven rake kniven added a comment - Hello, does the new chcp call has any impact on binary build output? Will my exe differ after calling chcp? I have a Delphi build slave and it omplains about not finding chcp command. I know how to fix this and thought about any side effects. Cheers
          Hide
          marshall777 Lionel Cabasson added a comment -

          Hello,

          This change won't impact the binary built by msbuild.
          However, it changes the encoding of the log generated by msbuild. If anything in your build process parses this output, it will be impacted and might behave differently.

          I hope this answers your question.

          Regards

          Show
          marshall777 Lionel Cabasson added a comment - Hello, This change won't impact the binary built by msbuild. However, it changes the encoding of the log generated by msbuild. If anything in your build process parses this output, it will be impacted and might behave differently. I hope this answers your question. Regards
          Hide
          rakekniven rake kniven added a comment -

          Hello Lionel,

          thank you for your response!
          Will give it a try.

          Cheers.

          Show
          rakekniven rake kniven added a comment - Hello Lionel, thank you for your response! Will give it a try. Cheers.
          Hide
          tecnospeedsa Tecno Speed added a comment - - edited

          Hello.

          I was tried to use this solution but my problem keeping existing.

          I use Windows server 2012 and jenkins.

          My Windows has page code 860, i tried to charge to chcp 1252, to same from jenkins, not success...
          I only need to output my logs with especial characteres(In portuguese PT-BR) to jenkins console.

          I also tried to change jenkins xml, including this argument: "-Dfile.encoding=UTF8", like is instructed in this link: https://medium.com/pacroy/how-to-fix-jenkins-console-log-encoding-issue-on-windows-a1f4b26e0db4

          No success also.

          Show
          tecnospeedsa Tecno Speed added a comment - - edited Hello. I was tried to use this solution but my problem keeping existing. I use Windows server 2012 and jenkins. My Windows has page code 860, i tried to charge to chcp 1252, to same from jenkins, not success... I only need to output my logs with especial characteres(In portuguese PT-BR) to jenkins console. I also tried to change jenkins xml, including this argument: "-Dfile.encoding=UTF8", like is instructed in this link: https://medium.com/pacroy/how-to-fix-jenkins-console-log-encoding-issue-on-windows-a1f4b26e0db4 No success also.

            People

            • Assignee:
              marshall777 Lionel Cabasson
              Reporter:
              hub Hubert Chauvat
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: