#48464 [Asn->Bgs]: No regexp match in utf8 mode

From: Date: Wed, 03 Jun 2009 22:45:13 +0000
Subject: #48464 [Asn->Bgs]: No regexp match in utf8 mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-138030@lists.php.net to get a copy of this message
ID: 48464 Updated by: scottmac@php.net Reported By: daniel at poradnik-webmastera dot com -Status: Assigned +Status: Bogus Bug Type: PCRE related Operating System: windows xp PHP Version: 5.2.9 Assigned To: nlopess New Comment: In PHP6 \xab is a codepoint, in anything below its binary. Previous Comments: ------------------------------------------------------------------------ [2009-06-03 21:14:51] nlopess@php.net I don't have PHP 6 compiled at hand, but I assume that PHP 6 is replacing the bad char before sending the string to pcre. Can you check if it's the case by printing $str? ------------------------------------------------------------------------ [2009-06-03 21:00:20] jani@php.net Nuno, how come the script says "match" with HEAD? ------------------------------------------------------------------------ [2009-06-03 20:49:50] scottmac@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Check preg_last_error() it will return PREG_BAD_UTF8_ERROR \xab isn't valid UTF-8, however \xc2\xab is. It should be 2 bytes. ------------------------------------------------------------------------ [2009-06-03 20:49:19] jani@php.net Works in HEAD. ------------------------------------------------------------------------ [2009-06-03 20:48:44] nlopess@php.net $str is not a valid UTF-8 string, and thus the pcre engine rejects it. no bug here. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/48464 -- Edit this bug report at http://bugs.php.net/?id=48464&edit=1

« previous php.bugs (#138030) next »