JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6922

Regexp#match interpets pos parameter in term of bytes instead of chars

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.RC1
    • Fix Version/s: JRuby 1.7.0.RC2
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      1

      Activity

      Hide
      M. Rou added a comment -
      1. encoding : utf-8
        s= '一000000' # first char is japanese for 'one' and uses 3 bytes in utf-8
        re = /0+/
        m = re.match s, 6 # m[0] => '000' should be '0'
        m = re.match s, 7 # => #<MatchData "00"> should be nil
      Show
      M. Rou added a comment - encoding : utf-8 s= '一000000' # first char is japanese for 'one' and uses 3 bytes in utf-8 re = /0+/ m = re.match s, 6 # m [0] => '000' should be '0' m = re.match s, 7 # => #<MatchData "00"> should be nil
      Hide
      Thomas E Enebo added a comment -

      This will miss imminent rc2 as it is going out, but we will try and fix this in final (1.7.0)

      Show
      Thomas E Enebo added a comment - This will miss imminent rc2 as it is going out, but we will try and fix this in final (1.7.0)
      Hide
      Thomas E Enebo added a comment -

      Lied...fixed for 1.7.0.RC2 after all in commit [master 55fa98c]

      Show
      Thomas E Enebo added a comment - Lied...fixed for 1.7.0.RC2 after all in commit [master 55fa98c]

        People

        • Assignee:
          Thomas E Enebo
          Reporter:
          M. Rou
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: