php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lokitek at gmail dot com
New email:
PHP Version: OS:

 

 [2008-10-20 18:34 UTC] lokitek at gmail dot com
Description:
------------
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-20 20:46 UTC] jani@php.net
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: Mon Dec 30 14:01:28 2024 UTC