php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66420 Doc should mention that support of PCRE for UTF8 is broken prior to 5.3
Submitted: 2014-01-05 18:18 UTC Modified: 2014-01-08 01:11 UTC
From: matteosistisette at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-01-05 18:18 UTC] matteosistisette at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/reference.pcre.pattern.modifiers
---

"""
u (PCRE_UTF8)
This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8. This modifier is available from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. UTF-8 validity of the pattern is checked since PHP 4.3.5.
"""

Since the utf8 modifier is available since 4.1.0 (!!) one would expect utf8 support to work since that version unless otherwise stated in the documentation. (otherwise, what does one want a modifier for utf8 for, if utf8 is not supported?)

No mention is done in this page that utf8 regular expressions on utf8 strings won't work in PHP versions prior to 5.3, but that is the case.

See http://3v4l.org/ERDp5

Either utf8 is only supported as of 5.3.4, or there was a bug that rendered it useless that has only been fixed in 5.3.4.

In either case, this must be documented with a gigantic red warning in this page.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-08 01:11 UTC] yohgaki@php.net
-Status: Open +Status: Wont fix
 [2014-01-08 01:11 UTC] yohgaki@php.net
Thank you for reporting. However, 5.3 support is already ended. It would not be a good idea to add this description at this stage.

You can add notes to the manual page. I appreciated if you add this note.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC