puts ENV_JAVA['file.encoding'] # => "UTF-8"
str = "Github 同性交友排解寂寞. jRuby + Java 起夜急开发"
str.encoding # => #<Encoding:UTF-8>
str.encode("GB2312") # => OK
str.encode("GBK") # => OK, same as GB2312
str.encode("GB18030") # => should be same as GBK/GB2312
# MRI: OK
# jRuby 9.0.1.0:
# got Encoding::InvalidByteSequenceError: "\xE5\x90\x8C" followed by "\xE6" on UTF-8
# jRuby 9.0.3.0: OK