#19346 [NEW]: preg_match() does not work for UTF-8

From: Date: Tue, 10 Sep 2002 22:30:08 +0000
Subject: #19346 [NEW]: preg_match() does not work for UTF-8
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18986@lists.php.net to get a copy of this message
From: gamid@isayev.net Operating system: Mandrake 8.1 PHP version: 4.2.2 PHP Bug Type: PCRE related Bug description: preg_match() does not work for UTF-8 <? $name = "Test".utf8_encode("\xDC");; echo "name = '$name'<BR>\n"; echo preg_match("/^[[:alpha:]]+$/u", $name); echo "<BR>\n"; ?> The above snippet does not produce expected result. According to documentation, preg_match() should return a true value, but it returns false. It looks as modifier 'u' does not work as it is described in the manual ( http://www.php.net/manual/en/pcre.pattern.modifiers.php ). -- Edit bug report at http://bugs.php.net/?id=19346&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19346&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19346&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19346&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19346&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19346&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19346&r=support Expected behavior: http://bugs.php.net/fix.php?id=19346&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19346&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19346&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19346&r=globals

« previous php.bugs (#18986) next »