php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45035 Reg exp. '/\w/u' not include ő, ű, Ő; and Ű; utf characters
Submitted: 2008-05-18 18:52 UTC Modified: 2008-05-19 09:29 UTC
From: kamarton at gmail dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 5.2.6 OS: Win XP
Private report: No CVE-ID: None
 [2008-05-18 18:52 UTC] kamarton at gmail dot com
Description:
------------
The regular expression engine with 'u' modifiers '\w' class not include few hungarian characters.
Not include: ő, ű, Ő and Ű.
PHP source file coding in utf8 with BOM.

Sorry my english.
Regards,
Marton

System:
WinXP, SP2
PHP 5.2.5 (xampp version)
(source editor: Notepad++ v4.9.2.)

Reproduce code:
---------------
echo preg_replace('/\w/u','_','???ő???ű????Ő???Ű?');

Expected result:
----------------
echo -> '__________________'

Actual result:
--------------
echo -> '___ő___ű____Ő___Ű_'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-18 19:07 UTC] kamarton at gmail dot com
Reproduce code:
---------------
echo preg_replace('/\w/u','_','???ő???ű????Ő???Ű?');

Expected result:
----------------
echo -> '__________________'

Actual result:
--------------
echo -> '___ő___ű____Ő___Ű_'
 [2008-05-19 09:29 UTC] nlopess@php.net
Not a bug in PHP. Bugs in the PCRE lib should be filled at: http://bugs.exim.org/enter_bug.cgi?product=PCRE
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 03:01:29 2024 UTC