ID: 48790
Updated by: [email protected]
Reported By: php at pwnt dot be
-Status: Open
+Status: Bogus
Bug Type: PCRE related
Operating System: All
PHP Version: 5.2.10
New Comment:
The reproduce code is broken (I cannot read the input character), but
anyway if this is a bug, it's surelly not in PHP.
If you strongly believe this is a bug, please report it to the PCRE
team.
Previous Comments:
------------------------------------------------------------------------
[2009-07-03 17:09:04] php at pwnt dot be
This also occurs on Linux.
------------------------------------------------------------------------
[2009-07-03 16:59:52] php at pwnt dot be
Description:
------------
The behavior described at
http://php.net/manual/en/regexp.reference.unicode.php seems to have
changed between PHP 5.2.8 and 5.2.10 (don't know about 5.2.9). I use
preg_match() with a \p regexp to check if a character is a letter (or a
number, in this case), and this seems to fail for wide characters in
5.2.10.
Reproduce code:
---------------
echo preg_match('/^[\pL\pN]$/', 'é');
Expected result:
----------------
1
Actual result:
--------------
PHP 5.2.8: 1
PHP 5.2.10: 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48790&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.