Details
Description
I use groovy template engine to generate reports in different languages such as English, Chinese, Japanese, and Korean. The templates I created are UTF-8 encoded. Currently SimpleTemplateEngine.createTemplate("scriptAsString") invokes GroovyShell.parse(String scriptText) which converts string to a byte array using String.getBytes(). Since I am running Traditional Chinese Windows, getBytes() is equal to getBytes("Big5") and breaks characters in other language like Japanese. To resolve this, the parse() and related methods may need an charset argument or do not convert script to byte array simply using getBytes().
SimpleTemplateEngine (and all other TE's) now allow you to provide your own GroovyShell which allows you to set the encoding via CompilerConfiguration if you wish.