Doc #50103 [NoF->Fbk]: Outdated information regarding PCRE unicode support
| From: | frozenfire@php.net | Date: | Sun, 04 Dec 2011 03:42:58 +0000 |
| Subject: | Doc #50103 [NoF->Fbk]: Outdated information regarding PCRE unicode support | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7547@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50103&edit=1
ID: 50103
Updated by: frozenfire@php.net
Reported by: pete_cags at hotmail dot com
Summary: Outdated information regarding PCRE unicode support
-Status: No Feedback
+Status: Feedback
Type: Documentation Problem
Package: Documentation problem
Operating System: Windows XP 64bit
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Err. I switched it to "No Feedback" too soon... Has the attached patch been
committed? It seems like a reasonable contribution.
Previous Comments:
------------------------------------------------------------------------
[2010-08-10 19:06:03] philip@php.net
Patch? :)
------------------------------------------------------------------------
[2010-05-15 13:24:55] pete_cags at hotmail dot com
Sorry it has taken me so long to get back to this, but at the
time of reporting it I wasn't confident enough with Regular
Expressions to dispute the bogus status. I have now asked for it
to be re-opened as I'm confident it isn't bogus. Whilst
InMusicalSymbols isn't supported, "Greek" is as are many other
script types. The following code demonstrates this (I omitted the
output in an attempt to avoid TL:DR).
<?php
header("Content-Type: text/html; charset=UTF-8");
$chars = array('Φ', 'a', '1');
foreach($chars as $char) {
if( preg_match( '#\p{Greek}#u', $char ) ) {
echo "{$char} is from the Greek script.<br/>";
} else {
echo "{$char} is NOT from the Greek script.<br/>";
}
}
foreach($chars as $char) {
if( preg_match( '#\p{invalid}#u', $char ) ) {
echo "{$char} is from the Greek script.<br/>";
} else {
echo "{$char} is NOT from the Greek script.<br/>";
}
}
?>
A full list of supported scripts can be found @
http://www.pcre.org/pcre.txt. If needs be I am happy to
create a patch
for the documents, but thought it only fair to re-open this bug in case
further discussion is required first.
------------------------------------------------------------------------
[2010-05-15 13:09:53] degeberg@php.net
Re-opened by request of submitter.
------------------------------------------------------------------------
[2009-11-13 16:52:56] vrana@php.net
Characters are supported but there is no class for it (like \pL for letters).
------------------------------------------------------------------------
[2009-11-06 16:37:32] pete_cags at hotmail dot com
Description:
------------
The documentation located...
http://www.php.net/manual/en/regexp.reference.unicode.php
Contains the following text...
"Extended properties such as "Greek" or "InMusicalSymbols" are not
supported by PCRE."
This is no longer the case as it DOES support Greek (and many other) characters.
Reproduce code:
---------------
N/A
Expected result:
----------------
N/A
Actual result:
--------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50103&edit=1