cucumber/cucumber-jvm — Issue #251: chartset about InputStreamReader when parse groovy file
Author: k4124k
Created: 2012-03-10 06:46:36+00:00
State: open

when using command to run cucumber-jvm, always see some random code of chinese!
then i found that the InputStreamReader was not assigned utf-8.

OS: windows7 X64 zh-cn

Error Message:
[java] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[java] A8Grid_Steps.groovy: 22: expecting anything but ''\n''; got it anyway @ line 22, column 47.
[java] \\d+)鏉¤褰?){int currentRows ->
[java] ^
[java]
[java] 1 error

java file path:cucumber-jvm / groovy / src / main / java / cucumber / runtime / groovy / GroovyBackend.java
Error method:
private Script parse(Resource resource) {
try {
return shell.parse(new InputStreamReader(resource.getInputStream()), resource.getPath());
} catch (IOException e) {
throw new CucumberException(e);
}
}