diff --git a/accurest-core/src/main/groovy/io/codearte/accurest/builder/MethodBuilder.groovy b/accurest-core/src/main/groovy/io/codearte/accurest/builder/MethodBuilder.groovy index c4e8da6d04..55a0f66f36 100644 --- a/accurest-core/src/main/groovy/io/codearte/accurest/builder/MethodBuilder.groovy +++ b/accurest-core/src/main/groovy/io/codearte/accurest/builder/MethodBuilder.groovy @@ -6,6 +6,7 @@ import io.codearte.accurest.config.TestFramework import io.codearte.accurest.config.TestMode import io.codearte.accurest.dsl.GroovyDsl import io.codearte.accurest.util.NamesUtil +import org.codehaus.groovy.control.CompilerConfiguration /** * @author Jakub Kubrynski @@ -25,7 +26,7 @@ class MethodBuilder { static MethodBuilder createTestMethod(File stubsFile, AccurestConfigProperties configProperties) { log.debug("Stub content from file [${stubsFile.text}]") - GroovyDsl stubContent = new GroovyShell(this.classLoader).evaluate(stubsFile) + GroovyDsl stubContent = new GroovyShell(this.classLoader, new Binding(), new CompilerConfiguration(sourceEncoding:'UTF-8')).evaluate(stubsFile) log.debug("Stub content Groovy DSL [$stubContent]") String methodName = NamesUtil.camelCase(NamesUtil.toLastDot(NamesUtil.afterLast(stubsFile.path, File.separator))) return new MethodBuilder(methodName, stubContent, configProperties)