Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9k fail to compile ruby code of using multibyte char on Windows #3175

Closed
yousuketto opened this Issue Jul 24, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@yousuketto
Copy link
Contributor

commented Jul 24, 2015

I have used jruby 9.0.0.0 on Windows.
9k fail to compile ruby code of using multibyte char.
I was comfirmed using jrubyc and JRuby.compile_ir, warble compiled war

  • ex) use jrubyc
# coding: utf-8
puts ""
C:\workspace>jrubyc target.rb
SyntaxError: target.rb:2: invalid multibyte char (UTF-8)
puts "???"

                                parse at file:/C:/workspace/jruby-9.0.0.0/lib/jruby.jar!/jruby/jruby.rb:66
                           compile_ir at file:/C:/workspace/jruby-9.0.0.0/lib/jruby.jar!/jruby/jruby.rb:78
  block in compile_files_with_options at C:/workspace/jruby-9.0.0.0/lib/ruby/stdlib/jruby/compiler.rb:159
                                 call at org/jruby/RubyProc.java:308
  block in compile_files_with_options at C:/workspace/jruby-9.0.0.0/lib/ruby/stdlib/jruby/compiler.rb:291
                                 each at org/jruby/RubyArray.java:1560
           compile_files_with_options at C:/workspace/jruby-9.0.0.0/lib/ruby/stdlib/jruby/compiler.rb:275
                         compile_argv at C:/workspace/jruby-9.0.0.0/lib/ruby/stdlib/jruby/compiler.rb:94
                                <top> at C:/workspace/jruby-9.0.0.0/bin/jrubyc:5

@enebo enebo added this to the JRuby 9.0.1.0 milestone Jul 24, 2015

@enebo

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

This does seem to be windows-specific in as much as I tried playing with JVM -Dfile.encoding and could not get MacOS to fail.

@enebo enebo closed this in 1778496 Aug 21, 2015

@enebo

This comment has been minimized.

Copy link
Member

commented Aug 21, 2015

@yousuketto On my machine the utf-8 for 'a' in Hiragana does not show up as that symbol in either .rb or .class compiled. On MacOS, with CP-1252 as my file.encoding it does show up correctly. I think this has more to do with displaying output than JRuby improperly compiling this (it is possible we have a different bug with displaying this properly on windows though). So I believe this is fixed. At least I know I fixed 2 issues with jrubyc.

@yousuketto

This comment has been minimized.

Copy link
Contributor Author

commented Aug 24, 2015

@enebo Thank you so much. I have been able to compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.