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
 [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

Pull Requests

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 Dec 13 04:01:27 2024 UTC