ID:               43567
 User updated by:  brito_victor at yahoo dot fr
-Summary:          Compilation failure when using UTF-8
 Reported By:      brito_victor at yahoo dot fr
 Status:           Open
 Bug Type:         PCRE related
 Operating System: Windows XP SP2
 PHP Version:      5.2.5
 New Comment:

Bug seen on Windows XP SP2.


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

[2007-12-11 17:02:04] brito_victor at yahoo dot fr

Description:
------------
In a test script, I call preg_match() function, using the flag u, in
order to test an UTF-8 regular expression with hexadecimal characters.
Of course, the mbstring extension is loaded and active.

Reproduce code:
---------------
$mb = function_exists('mb_detect_encoding');
$pregutf8 = preg_match("/\xf8\xa1\xa1\xa1\xa1/u",
"\xf8\xa1\xa1\xa1\xa1");

Expected result:
----------------
Returns true for both variables.

Actual result:
--------------
Returns true for $mb.
Returns the following warning message for $pregutf8: "Warning: 
preg_match() [function.preg-match]: Compilation failed: invalid UTF-8
string at offset 0"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43567&edit=1

Reply via email to