Fix RubyIO read & write UTF8 bug