Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: JRuby 1.1.1
-
Fix Version/s: None
-
Component/s: Parser
-
Labels:None
-
Environment:Windows Vista Home Premium SP1
Java6 Update5
-
Number of attachments :
Description
JRuby cannot parse script when .rb file contains Kanji which trailing byte is 0x5C(Yen sign) even if specify -Ks option.
> jruby -v
ruby 1.8.6 (2008-04-22 rev 6555) [x86-jruby1.1.1]
> jruby -Ks sjis.rb
:1: sjis.rb:4: unterminated string meets end of file (SyntaxError)
In MRI, if specify -K option, it will set KCode before load script file.
And it effects lexical analysis to recognize Kanji.
Example:
> ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> ruby -Ks sjis.rb
Full width wave dash : ...
Number with circle : ...
Kanji with 0x5C : ...
Note: ... is Kanji which is expected.
Although this is reported against -Ks (1.8.x) behavior, I am just mentioning that this works in --1.9 mode when the proper (# coding: sjis) line is added at the top of the file. (I only mention this as a potential work-around for sjis on JRuby until this is resolved).