Doc #67041 [Com]: POSIX character classes and UTF-8

From: Date: Tue, 08 Apr 2014 14:37:34 +0000
Subject: Doc #67041 [Com]: POSIX character classes and UTF-8
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11131@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67041&edit=1

 ID:                 67041
 Comment by:         trainmaster at gmx dot net
 Reported by:        cmbecker69 at gmx dot de
 Summary:            POSIX character classes and UTF-8
 Status:             Open
 Type:               Documentation Problem
 Package:            PCRE related
 Operating System:   *
 PHP Version:        5.5.11
 Block user comment: N
 Private report:     N

 New Comment:

Introduced with 5.3.4? http://3v4l.org/RNhTU


Previous Comments:
------------------------------------------------------------------------
[2014-04-07 21:48:02] cmbecker69 at gmx dot de

Description:
------------
The PREG manual states[1]:

| In UTF-8 mode, characters with values greater than 128 do not
| match any of the POSIX character classes.

However, that is not necessarily true, so the statement should be
changed appropriately.

Test script:
---------------
var_dump(preg_match('/^[[:alnum:]]$/u', "\xc3\x84"));

Expected result:
----------------
int(0) // expected according to the current documentation

Actual result:
--------------
int(1)


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



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


Thread (5 messages)

« previous php.doc.bugs (#11131) next »