Bug #76512 [Csd]: \w no longer includes unicode characters
| From: | cmb@php.net | Date: | Thu, 21 Jun 2018 20:48:54 +0000 |
| Subject: | Bug #76512 [Csd]: \w no longer includes unicode characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215842@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76512&edit=1
ID: 76512
Updated by: cmb@php.net
Reported by: leo dot feyer at gmail dot com
Summary: \w no longer includes unicode characters
Status: Closed
Type: Bug
Package: PCRE related
Operating System: MacOS
PHP Version: 7.3.0alpha2
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks, Anatol. I'll try to have a look at the locale stuff on
Windows later.
And of course, thanks, Leo, for reporting this issue!
Previous Comments:
------------------------------------------------------------------------
[2018-06-21 20:47:01] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=71d16feebbb38f69007d8b7bec44afeb916281fb
Log: Fix #76512: \w no longer includes unicode characters
------------------------------------------------------------------------
[2018-06-21 17:25:50] ab@php.net
That's the correct diagnose, Christoph. It was not intended and is a trivial porting mistake.
It affected also ext/pcre/tests/bug52971.phpt which looked like a beaviour change.
Seems there might be also an additional issue with the locale handling on Windows. I'm not sure
yet it's about PCRE2 or setlocale(), needs more investigation.
Thanks.
------------------------------------------------------------------------
[2018-06-21 15:51:13] cmb@php.net
> It seems to me that this PCRE_UCP[1] should actually be PCRE2_UCP.
Indeed.
------------------------------------------------------------------------
[2018-06-21 14:19:32] cmb@php.net
It seems to me that this PCRE_UCP[1] should actually be PCRE2_UCP.
[1] <https://github.com/php/php-src/blob/5eb1f92f31cafc48384f9096012f421b37f6d425/ext/pcre/php_pcre.c#L676>
------------------------------------------------------------------------
[2018-06-21 13:47:21] leo dot feyer at gmail dot com
Description:
------------
The \w escape sequence no longer includes unicode characters in PHP 7.3.
See https://3v4l.org/uJKEC
I don't know if this is intended, but since the change is not mentioned in the UPGRADING file,
it might be not.
Test script:
---------------
var_dump(preg_match('/\w/u', 'ä'));
Expected result:
----------------
The test script returns int(1) on PHP <7.3 and int(0) on PHP 7.3.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76512&edit=1