It defines an encoding property but fails to use it. Silly me.

          [JENKINS-27094] WriteFileStep ignores encoding

          If would be nice if this was already implemented, as lack of encoding makes writing binary files a hassle.

          Grzegorz Pisarek added a comment - If would be nice if this was already implemented, as lack of encoding makes writing binary files a hassle.

          Pawel Mucha added a comment -

          I would like to vote for that fix, because I am using "writeFile" method to overwrite AssemblyInfo.cs on windows, to change version number of application on every build, and right now writeFile is putting into a file '?' sign into first line, and my project is failing during compilation

          Pawel Mucha added a comment - I would like to vote for that fix, because I am using "writeFile" method to overwrite AssemblyInfo.cs on windows, to change version number of application on every build, and right now writeFile is putting into a file '?' sign into first line, and my project is failing during compilation

          Jesse Glick added a comment -

          Rather than adding comments to the effect of “please implement this”, click on the Vote button (and/or offer a tested PR).

          Jesse Glick added a comment - Rather than adding comments to the effect of “please implement this”, click on the Vote button (and/or offer a tested PR).

          Daniel Butler added a comment -

          Daniel Butler added a comment - PR: https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/38

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/steps/WriteFileStep.java
          src/test/java/org/jenkinsci/plugins/workflow/steps/ReadWriteFileStepTest.java
          http://jenkins-ci.org/commit/workflow-basic-steps-plugin/37d4589bc6bbc4cabfc227ebcc8d383470a06942
          Log:
          Merge pull request #38 from dbut023/jenkins-27094-writefile-encoding

          JENKINS-27094 writeFile encoding parameter

          Compare: https://github.com/jenkinsci/workflow-basic-steps-plugin/compare/b1b29f6d43dd...37d4589bc6bb

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/steps/WriteFileStep.java src/test/java/org/jenkinsci/plugins/workflow/steps/ReadWriteFileStepTest.java http://jenkins-ci.org/commit/workflow-basic-steps-plugin/37d4589bc6bbc4cabfc227ebcc8d383470a06942 Log: Merge pull request #38 from dbut023/jenkins-27094-writefile-encoding JENKINS-27094 writeFile encoding parameter Compare: https://github.com/jenkinsci/workflow-basic-steps-plugin/compare/b1b29f6d43dd...37d4589bc6bb

          Michal Fuchs added a comment -

          It looks that in the implementation is missing exception for Base64 encoding. By the documentation such text should be decoded first and saved as binary.

          It would be fine to fix it. Thanks!

          Michal Fuchs added a comment - It looks that in the implementation is missing exception for Base64 encoding. By the documentation such text should be decoded first and saved as binary. It would be fine to fix it. Thanks!

          Jesse Glick added a comment -

          muf support for Base64-encoding would be a separate feature, not covered by this issue.

          Jesse Glick added a comment - muf support for Base64-encoding would be a separate feature, not covered by this issue.

            danielbutler Daniel Butler
            jglick Jesse Glick
            Votes:
            8 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: