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

Scriptler 3.1 destroys groovy scripts containing German special characters (Umlauts)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • scriptler-plugin
    • None
    • Windows Server 2008 64bit
      Jenkins 2.190.1
      Scriptler 3.1
      java version "1.8.0_221"

      I have some groovy scripts replacing German characters like 'ß' by '.' e.g.:

      directory.getName().replace('ß','.')

      Now since Scriptler plugin version 3.1 when editing those scripts I see '?' instead of 'ß' and after saving the scripts they are no more working because characters are replaced by invalid characters.

      I guess that files are encoded in ISO 8859-1 but now are intepreted as UTF-8.

      Finally going back to Scriptler plugin version 2.9 solved the problem.

          [JENKINS-59841] Scriptler 3.1 destroys groovy scripts containing German special characters (Umlauts)

          der_dag could you please check wether the files are also saved with the wrong encoding on the disc? at <JENKINS_HOME>/scriptler/scripts?*.groovy

          and could you attach a simple example file? 

          thanks!

          Dominik Bartholdi added a comment - der_dag could you please check wether the files are also saved with the wrong encoding on the disc? at <JENKINS_HOME>/scriptler/scripts?*.groovy and could you attach a simple example file?  thanks!

          imod Please find two files attached. One is the original one saved with Scriptler 2.9. Second is after editing and saving it using Scriptler 3.1. You can see encoding of this file was changed to UTF-8 and two characters 'ß' were replaced by '?'.

          Robert Nitschke added a comment - imod Please find two files attached. One is the original one saved with Scriptler 2.9. Second is after editing and saving it using Scriptler 3.1. You can see encoding of this file was changed to UTF-8 and two characters 'ß' were replaced by '?'.

          Thanks for reporting this, der_dag. I've been able to reproduce this issue locally and it appears to be caused by the system's default character set not being UTF-8. I've opened a PR to resolve this at https://github.com/jenkinsci/scriptler-plugin/pull/46.

          Michael Tughan added a comment - Thanks for reporting this, der_dag . I've been able to reproduce this issue locally and it appears to be caused by the system's default character set not being UTF-8. I've opened a PR to resolve this at https://github.com/jenkinsci/scriptler-plugin/pull/46 .

          Scriptler 3.5 is released to fix this issue. Scripts will need to be opened, fixed, and saved again to be stored properly, but all operations are done using the UTF-8 encoding now.

          Michael Tughan added a comment - Scriptler 3.5 is released to fix this issue. Scripts will need to be opened, fixed, and saved again to be stored properly, but all operations are done using the UTF-8 encoding now.

            mtughan Michael Tughan
            der_dag Robert Nitschke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: