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

From: Date: Mon, 10 Nov 2014 21:56:56 +0000
Subject: Doc #67041 [Ana]: POSIX character classes and UTF-8
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11625@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
 User updated by:    cmbecker69 at gmx dot de
 Reported by:        cmbecker69 at gmx dot de
 Summary:            POSIX character classes and UTF-8
 Status:             Analyzed
 Type:               Documentation Problem
 Package:            PCRE related
 Operating System:   *
 PHP Version:        5.5.11
 Block user comment: N
 Private report:     N

 New Comment:

> The PREG manual states[1]:

I had forgotten the footnote. It should have been

[1] <http://php.net/manual/en/regexp.reference.character-classes.php>

> However, I couldn't see relevant changes that cause this.

It seems to me that the change might be caused by item 9 in the
changelog of Version 8.10 25-Jun-2010[2].

[2] <http://www.pcre.org/changelog.txt>


Previous Comments:
------------------------------------------------------------------------
[2014-04-15 22:51:57] dm@php.net

It seems that behavior changed in 5.3.4 (PCRE updated to 8.10). However, I couldn't see
relevant changes that cause this. Will look further, if anything, docs can be updated to reflect it.

Thanks for report.

------------------------------------------------------------------------
[2014-04-08 14:37:32] trainmaster at gmx dot net

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

------------------------------------------------------------------------
[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 (#11625) next »