jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-2484

unicode symbol not supported as in MRI

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.1
  • Fix Version/s: JRuby 1.2
  • Component/s: Parser
  • Labels:
    None
  • Environment:
    windows xp netbeans6.1(project rails encoding set to utf-8) rails 2.0.2

Description

<%= c.radio_button :sex, :男 %>

causes exception "Invalid char `\224' ('?') in expression" in jruby 1.1.1 but not in MRI 1.8.6

and defining a unicode symbol in jirb_swing just makes it crashed

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Thomas E Enebo added a comment - 12/May/08 2:43 PM

Looks like parser bug to me.. Taking for 1.1.2.

Show
Thomas E Enebo added a comment - 12/May/08 2:43 PM Looks like parser bug to me.. Taking for 1.1.2.
Hide
Permalink
Thomas E Enebo added a comment - 26/May/08 7:52 PM

So we are missing a fairly simple check in our identifier checking code...that code though needs to know kcode setting (or string encoding pragma for 1.9). We can pass in KCode and joni under the covers will handle this with:

kcode.getEncoding().length(c) == 1

as an extra check to isIndentifierChar. A second option is to just replicate RE.c encoding tables. This would be a tiny amount of code, but I suspect for 1.9 support this will be a short-sighted direction to take. Thanks to the night owl lopex for helping me out on this.

In either case the parser needs to be aware of the kcode setting.

Show
Thomas E Enebo added a comment - 26/May/08 7:52 PM So we are missing a fairly simple check in our identifier checking code...that code though needs to know kcode setting (or string encoding pragma for 1.9). We can pass in KCode and joni under the covers will handle this with:
kcode.getEncoding().length(c) == 1
as an extra check to isIndentifierChar. A second option is to just replicate RE.c encoding tables. This would be a tiny amount of code, but I suspect for 1.9 support this will be a short-sighted direction to take. Thanks to the night owl lopex for helping me out on this. In either case the parser needs to be aware of the kcode setting.
Hide
Permalink
Charles Oliver Nutter added a comment - 27/May/08 2:07 PM

Tom looked into it today and it's more than he's comfortable doing for 1.1.2. We'll have it in 1.1.3, and probably on trunk within days.

Show
Charles Oliver Nutter added a comment - 27/May/08 2:07 PM Tom looked into it today and it's more than he's comfortable doing for 1.1.2. We'll have it in 1.1.3, and probably on trunk within days.
Hide
Permalink
Charles Oliver Nutter added a comment - 16/Jul/08 3:10 AM

Sorry for punting this one again, but this cycle has just been too tight. Anyone that's a parser expert is welcome to jump in and help.

Show
Charles Oliver Nutter added a comment - 16/Jul/08 3:10 AM Sorry for punting this one again, but this cycle has just been too tight. Anyone that's a parser expert is welcome to jump in and help.
Hide
Permalink
Charles Oliver Nutter added a comment - 08/Feb/09 1:30 AM

This is actually fixed now, but depends on running with -Ku (in both JRuby and MRI).

Show
Charles Oliver Nutter added a comment - 08/Feb/09 1:30 AM This is actually fixed now, but depends on running with -Ku (in both JRuby and MRI).

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    xiefei
Vote (0)
Watch (1)

Dates

  • Created:
    02/May/08 5:01 AM
    Updated:
    21/Mar/09 1:14 PM
    Resolved:
    08/Feb/09 1:30 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.