import java.io.UnsupportedEncodingException; public class UnicodeDecoder { public static String escape(String src) { int i; char j; StringBuffer tmp = new StringBuffer(); tmp.ensureCapacity(src.length() * 6); for (i = 0; i < src.length(); i++) { j =
1,问题 在写一个统计代码行数的脚本时遇到一个问题: 代码: file_name = "code.rb"c = 0File.foreach(file_name) do |x| next unless x !~ /^\s*(#|\s*$)/ c = c + 1 end 运行的时候报错 ArgumentError: invalid byte sequence in GBK =~ at org/jruby/RubyRegexp.java:1486 =~ at org/jruby/RubySt