php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78812 Error in case recognition of cyrillic ya
Submitted: 2019-11-14 11:12 UTC Modified: 2019-11-16 18:01 UTC
From: vklimin at 510710 dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 7.3.11 OS: Debian 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vklimin at 510710 dot com
New email:
PHP Version: OS:

 

 [2019-11-14 11:12 UTC] vklimin at 510710 dot com
Description:
------------
Regular expression does not detect a case of first letters in cyrillic strings.

Test script:
---------------
TEST 1: preg_match( '/(?=ял)/ui', 'яЛ', $matches); var_dump($matches);
RESULT 1 IS CORRECT:
array(1) {
  [0]=>
  string(0) ""
}

TEST 2: preg_match( '/(?=ял)/ui', 'Ял', $matches); var_dump($matches);
RESULT 2 IS INCORRECT:
array(0) {
}

RESULT 2 MUST BE:
array(1) {
  [0]=>
  string(0) ""
}

Expected result:
----------------
RESULT 2 MUST BE:
array(1) {
  [0]=>
  string(0) ""
}

Actual result:
--------------
RESULT 2 IS INCORRECT:
array(0) {
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-11-14 17:40 UTC] requinix@php.net
-Summary: Error in case recognition of the first letter in cyrillic strings +Summary: Error in case recognition of cyrillic ya -Status: Open +Status: Not a bug -Package: *Regular Expressions +Package: PCRE related
 [2019-11-14 17:40 UTC] requinix@php.net
Confirmed https://3v4l.org/Op0GK

...but this is an upstream bug. https://bugs.exim.org/show_bug.cgi?id=2466
 [2019-11-16 18:01 UTC] requinix@php.net
Will be fixed with PCRE2 10.34, which looks like it will correspond to PHP 8.0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC