php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50103 Outdated information regarding PCRE unicode support
Submitted: 2009-11-06 16:37 UTC Modified: 2013-02-18 00:34 UTC
From: pete_cags at hotmail dot com Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: Irrelevant OS: Windows XP 64bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
49 - 35 = ?
Subscribe to this entry?

 
 [2009-11-06 16:37 UTC] 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

Patches

add-script-support (last revision 2010-05-21 13:51 UTC by pete_cags at hotmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-13 16:52 UTC] vrana@php.net
Characters are supported but there is no class for it (like \pL for letters).
 [2010-05-15 13:09 UTC] degeberg@php.net
-Status: Bogus +Status: Re-Opened
 [2010-05-15 13:09 UTC] degeberg@php.net
Re-opened by request of submitter.
 [2010-05-15 13:24 UTC] 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-08-10 19:06 UTC] philip@php.net
-Status: Re-Opened +Status: Feedback
 [2010-08-10 19:06 UTC] philip@php.net
Patch? :)
 [2011-12-04 03:40 UTC] frozenfire@php.net
-Status: Feedback +Status: No Feedback
 [2011-12-04 03:42 UTC] frozenfire@php.net
-Status: No Feedback +Status: Feedback
 [2011-12-04 03:42 UTC] frozenfire@php.net
Err. I switched it to "No Feedback" too soon... Has the attached patch been 
committed? It seems like a reasonable contribution.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 19:01:29 2024 UTC