I would say groovy is the best scripting language on JVM platform.
And character encoding is the worst thing in the world. I use UTF-8 to make my file compatible with other OS, but stupid windows decide to use GB2312 when I use Chinese.
So, in the screenshot, you can see I successfully integrate groovy scripting in my program, but somehow the JVM failed to translate the file related string from gb2312 to UTF-8.
According to StackOverflow, from PS core v6+, UTF-8 without BOM is the default encoding. But sadly, I'm on v5.