Problem in command line arguments (Maybe a bug)

I’m a ruby beginner. As I had installed NetBeans6.0 in WinXP_SP2, I
chose jruby to practise. But there is a problem when passing Chinese
Characters(I’m Chinese) as command line arguments, jruby doesn’t
received them correctly.
For example, here is a test.rb:
ARGV.each do |arg|
puts “#{arg}\n”
end
(Taking the consideration of the unsupport of Chinese character of your
computer, I use @ to replace these Chinese characters:)
The command is “jruby test.rb @@@”, but the string jruby puts to STDOUT
is simply “???”. As you see, jruby uses exactly the same amounts of ‘?’
to replace Chinese charactors.
The version of jruby came along with NetBeans6.0 is 1.0.2. Then I
download the 1.1.2, but the problem is still existed.
PS:
If I place the test.rb under a path with Chinese Charactors(such as
D:@@\test.rb), jruby_1.0.2 can process test.rb but can’t process the
Chinese characters as arguments; while using newer jruby_1.12, it even
can’t get acess to test.rb(Report can’t find D:??\test.rb), and it
still can’t process the Chinese characters as arguments.
Pure Ruby is OK, and Chinese charactors gets form text files is also OK
under jruby.
Thanks.

This is definitely a bug. Please file it here:
http://jira.codehaus.org/browse/JRUBY

謝謝

于三儿 wrote:

The command is “jruby test.rb @@@”, but the string jruby puts to STDOUT
Pure Ruby is OK, and Chinese charactors gets form text files is also OK
under jruby.
Thanks.


网易首款免费3D网游“天下2”,6月6日激情公测 http://tx2.163.com/fab.html


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email