-K option does not work when parsing script.
--------------------------------------------

                 Key: JRUBY-2532
                 URL: http://jira.codehaus.org/browse/JRUBY-2532
             Project: JRuby
          Issue Type: Bug
          Components: Parser
    Affects Versions: JRuby 1.1.1
         Environment: Windows Vista Home Premium SP1
Java6 Update5
            Reporter: Manabu Shibata
            Assignee: Thomas E Enebo
            Priority: Minor
         Attachments: sjis.rb

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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to