|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46346 Ereg_replace of x bug
Submitted: 2008-10-20 18:34 UTC Modified: 2008-10-20 20:46 UTC
From: lokitek at gmail dot com Assigned:
Status: Not a bug Package: *Unicode Issues
PHP Version: 5.2.6 OS: Red Hat Enterprise
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.
Block user comment
Status: Assign to:
Bug Type:
From: lokitek at gmail dot com
New email:
PHP Version: OS:


 [2008-10-20 18:34 UTC] lokitek at gmail dot com
Trying to remove/convert any non-utf8 character to an html equivalent, x is being replaced when it shouldn't.

The ord value of x is 120. The ord value of Y diaeresis is suppose to be 376.

Reproduce code:
$string = "x";

echo $string;

$string = ereg_replace(376,"Ÿ",$string);

echo $string;

Expected result:
x should still be echo'd the second time.

Actual result:
Y diaeresis is being echo'd out.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-20 20:46 UTC]
ereg_* functions are not unicode aware. Use preg_* functions which 
are. No bug but lacking support (which will never be implemented).
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 21:01:33 2024 UTC