jruby/jruby — pull request #186 by ryenus (2012-05-28 13:46:28+00:00)
Title: JRUBY-6679 respect console encoding

Though the fix is a bit hacky, it works for most western code pages. see https://gist.github.com/2819224

When chcp to `65001`, MRI correctly takes it as UTF-8, while this is not possible in Java, because `java.io.Console.cs` always returns Windows system locale for me

For CJK code pages, we don't have much luck yet, due to the poor support of Windows-ish code page names in jruby (probably jcodings)

Probably the above gist is better as the test compared to the attached spec (working though making not much sense), but that's what I got for now.

Looking forward, hopefully JRuby would get more complete encoding/codepage support, especially for CJK stuff.