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
Closed

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

yousuketto opened this issue Jul 24, 2015 · 3 comments

Comments

@yousuketto
Copy link
Contributor

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
Copy link
Member

enebo 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 as completed in 1778496 Aug 21, 2015
@enebo
Copy link
Member

enebo 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
Copy link
Contributor Author

@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
Projects
None yet
Development

No branches or pull requests

2 participants