#48790 [Opn]: Unicode character properties misbehave

[email protected] ("php at pwnt dot be")
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               48790
 User updated by:  php at pwnt dot be
 Reported By:      php at pwnt dot be
 Status:           Open
 Bug Type:         PCRE related
-Operating System: Windows XP SP3
+Operating System: All
 PHP Version:      5.2.10
 New Comment:

This also occurs on Linux.


Previous Comments:
------------------------------------------------------------------------

[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.