bugGNU Octave - Bugs: bug #35910, Incorrect regex matching of...

 
 

bug #35910: Incorrect regex matching of multi-byte UTF-8 characters

Submitted by:  Burkart Lingner <burkart>
Submitted on:  Tue 20 Mar 2012 04:29:25 PM UTC  
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  In Progress Assigned to:  Rik <rik5>
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 19 Nov 2016 09:08:45 PM UTC, comment #3:

This issue is still present in Octave 4.2.0.

Hartmut <hardy>
Thu 04 Jun 2015 01:35:26 AM UTC, comment #2:

Updating status to the development release, still present.

Mike Miller <mtmiller>
Project Administrator
Sun 25 Mar 2012 08:30:49 PM UTC, comment #1:

Confirmed on a recent tip.

Currently Octave does not support UTF8 in regular expressions, although it is not hard to add. I've made an experimental patch that does so but it does impact performance. UTF8 is 23% slower than non-UTF8 pattern matching.

Adding support for UTF8 is a big enough change that I am going to take the issue to the Octave Maintainers mailing list so that we can make a decision about how best to implement this. It is also big enough that this will come out not as a bug fix, but in the next major release of Octave (3.8.0).

Rik <rik5>
Project AdministratorIn charge of this item.
Tue 20 Mar 2012 04:29:25 PM UTC, original submission:

When matching a single character at a position where there's a multi-byte UTF-8 character, only the first byte is matched. Depending on how this match is then processed, it can result in invalid UTF-8. Example:

yields

where "?" is the replacement character and the UTF-8 codes for "§", ";", and "x" are "0xC2 0xA7", "0x3B", and "0x78", respectively.

The expected output would have been

Burkart Lingner <burkart>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by burkart (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-04 mtmiller Release3.6.1 => dev
        Operating SystemGNU/Linux => Any
    2012-03-25 rik5 CategoryInterpreter => Libraries
        StatusNone => In Progress
        Assigned toNone => rik5

    Back to the top


    Powered by Savane 3.3