[pcre-dev] [Bug 1412] New: \s Randomly Matches xA0

Top Page
Delete this message
Author: miqrogroove
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1412] New: \s Randomly Matches xA0
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1412
           Summary: \s Randomly Matches xA0
           Product: PCRE
           Version: 8.31
          Platform: All
               URL: http://core.trac.wordpress.org/ticket/22692
        OS/Version: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: miqrogroove@???
                CC: pcre-dev@???



I am working on a bug patch for WordPress. With the help of other developers
there, we have reached the conclusion that the PCRE \s sequence will randomly
match the \xA0 byte in some PHP environments but not in others.

Specifically, this PHP command will return 1 on some computers and 0 on other
computers:

var_dump( preg_match( '/^\s$/', "\xA0" ) );

In some cases it will produce different results within phpunit than without.

We have not been able to identify any specific environmental cause such as
hardware, OS, or PHP version.

Can you shed some light on why this regexp has random results?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email