总结:
用了jsr 223的 jruby实现, 如果ruby代码中出现中文,则会乱码。
Program Encoding - At the lowest level, a Ruby program is simply a sequence of characters.
Ruby's lexical rules are defined using characters of the ASCII character set.
All Ruby keywords are written using ASCII characters, and all operators and other punctuation are drawn from the ASCII character set.
解决:
方法1:就把中文以变量形式从ScriptManager传递给ruby
方法2:换另外一种语言javascript可以,,jython的2.5.2实现不错! jython 2.5之前还不支持jsr223