php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36304 reference.pcre.pattern.modifiers: u (PCRE_UTF8)
Submitted: 2006-02-06 15:57 UTC Modified: 2006-02-06 16:13 UTC
From: kkamkou at gmail dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4.4.2 OS: winXpSP2
Private report: No CVE-ID: None
 [2006-02-06 15:57 UTC] kkamkou at gmail dot com
Description:
------------
!!
!! CYR TEXT HERE! (windows-1251)
!!

UTF-8 word "т"(and some else) != (\w)

Reproduce code:
---------------
<?php
 echo preg_replace("/[^\w\d\-]/u" , '', "&#1056;&#1111;&#1057;&#1026;&#1056;&#1105;&#1056;&#1030;&#1056;?&#1057;&#8218;");
 echo "<hr />";
 echo preg_replace("/[^\w\d\-]/" ,  '', "&#1056;&#1111;&#1057;&#1026;&#1056;&#1105;&#1056;&#1030;&#1056;?&#1057;&#8218;");
 //as result &#1087;&#1088;&#1080;&#1074;&#1077;[] <- last tag is unknown

 echo "<hr />";
 echo preg_replace("/\w/u" ,  '#', "&#1056;&#1111;&#1057;&#1026;&#1056;&#1105;&#1056;&#1030;&#1056;?&#1057;&#8218;"); 

 //as result &#1087;&#1088;&#1080;&#1074;&#1077;&#1090; != ######
?>


Expected result:
----------------
&#1087;&#1088;&#1080;&#1074;&#1077;&#1090; == &#1087;&#1088;&#1080;&#1074;&#1077;&#1090;

Actual result:
--------------
&#1087;&#1088;&#1080;&#1074;&#1077;&#1090; != &#1087;&#1088;&#1080;&#1074;&#1077;&#1090;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-06 16:13 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC