php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37250 Regular expresion /i modifer bag
Submitted: 2006-04-30 15:33 UTC Modified: 2006-05-01 14:53 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: wise at alego dot org Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 5.1.2 OS: Linux 2.6.14-gentoo-r5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wise at alego dot org
New email:
PHP Version: OS:

 

 [2006-04-30 15:33 UTC] wise at alego dot org
Description:
------------
If regular expresion contains symbols in koi8-r charset, 
the modifier is ignored. 

Reproduce code:
---------------
$datatext="Привет, это пример к слову 'привет'";
echo preg_replace('/(&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;)/i','<b>${1}</b>',$datatext);

Expected result:
----------------
&#1055;&#1088;&#1080;&#1074;&#1077;&#1090;, &#1101;&#1090;&#1086; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088; &#1082; &#1089;&#1083;&#1086;&#1074;&#1091; '<b>&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;</b>' 

Actual result:
--------------
<b>&#1055;&#1088;&#1080;&#1074;&#1077;&#1090;</b>, &#1101;&#1090;&#1086; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088; &#1082; &#1089;&#1083;&#1086;&#1074;&#1091; '<b>&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;</b> 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-01 14:53 UTC] tony2001@php.net
Please report this problem to PCRElib developers.
Not PHP issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 11:01:31 2024 UTC