#48790 [Opn]: Unicode character properties misbehave

From: Date: Fri, 03 Jul 2009 17:09:04 +0000
Subject: #48790 [Opn]: Unicode character properties misbehave
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-139225@lists.php.net to get a copy of this message
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

« previous php.bugs (#139225) next »