When I import a groovy script with umlauts in comments and strings, I get the following error message. In version 5.3 everything was still OK. for example: // work in progress --> statusDe":"Beschäftigt","akt":34,"status":20 ... error message 2020-12-29 11:20:23,500 ERROR o.a.j.e.JSR223PostProcessor: Problem in JSR223 script, ExtractRepeatQuery javax.script.ScriptException: java.nio.charset.MalformedInputException: Input length = 1 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.readFully(GroovyScriptEngineImpl.java:458) ~[groovy-jsr223-3.0.5.jar:3.0.5] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:188) ~[groovy-jsr223-3.0.5.jar:3.0.5] at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:186) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.extractor.JSR223PostProcessor.process(JSR223PostProcessor.java:45) [ApacheJMeter_components.jar:5.4] at org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:952) [ApacheJMeter_core.jar:?] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:573) [ApacheJMeter_core.jar:?] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:?] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:?] at java.lang.Thread.run(Thread.java:832) [?:?] Caused by: java.nio.charset.MalformedInputException: Input length = 1 at java.nio.charset.CoderResult.throwException(CoderResult.java:274) ~[?:?] at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:352) ~[?:?] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188) ~[?:?] at java.io.InputStreamReader.read(InputStreamReader.java:181) ~[?:?] at java.io.BufferedReader.read1(BufferedReader.java:210) ~[?:?] at java.io.BufferedReader.read(BufferedReader.java:287) ~[?:?] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.readFully(GroovyScriptEngineImpl.java:454) ~[groovy-jsr223-3.0.5.jar:3.0.5] ... 8 more
Regression caused by 80c39149ef977f87ee03cddb0b99a21629126ce5
Can you tell us, what encoding your files are in and what language setting your setup has? (On linux this would be the values of LANG, LC_ALL and co.)
Hi there, the encoding of the scripts is UTF-8 and the language setting of the PC is German.
Which OS? Can you attach a minimal test-plan with a minimal groovy script, that triggers the issue? I tried a small script with Linux (utf-8 encoded) running with LANG=de_DE.utf-8 and had no problems.
Created attachment 37666 [details] a little test a small test as an attachment
Are you sure, that your groovy script is utf-8? When I unzipped it, I got the following encodings: $ file * TestGroovyFailed.groovy: ISO-8859 text, with CRLF line terminators TestGroovy.jmx: XML 1.0 document, ASCII text
Yes it is right.
"it is right" means a) the script is in iso-8859 and therefore has the wrong encoding b) the script is in utf-8 and the attached zip is wrong Please choose one and report back. If no feedback is given, we will close this bug, as it is most likely explained by a wrong encoding of the script.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5477