0
votes

When using JRuby 1.6.0.RC2 irb. the Chinese character were not display correctly.


160: jruby 1.6.0.RC2 (ruby 1.8.7 patchlevel 330) (2011-02-09 5434c72) (Java HotSpot(TM) Client VM 1.6.0_23) [Windows XP-x86-java]

PS C:> irb irb(main):001:0> puts "你好"

禮A礎n

=> nil


However, same terminal and switch to Ruby 1.9.2 using pik, the Chinese character were displayed just fine.


PS C:> pik 192

PS C:> irb

irb(main):001:0> puts "你好"

你好

=> nil

irb(main):002:0> puts RUBY_VERSION

1.9.2

=> nil

irb(main):003:0>


Since JRuby claims it can support UTF-8, am I doing something wrong or is it simply not ready yet?

1

1 Answers

0
votes

It could be a readline issue; do these work?

jruby -e 'puts "你好"'
jruby --1.9 -e 'puts "你好"'
jruby -Ku -e 'puts "你好"'