#46346 [Opn->Bgs]: Ereg_replace of x bug
| From: | jani@php.net | Date: | Mon, 20 Oct 2008 20:46:05 +0000 |
| Subject: | #46346 [Opn->Bgs]: Ereg_replace of x bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129893@lists.php.net to get a copy of this message | ||
ID: 46346
Updated by: jani@php.net
Reported By: lokitek at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: *Unicode Issues
Operating System: Red Hat Enterprise
PHP Version: 5.2.6
New Comment:
ereg_* functions are not unicode aware. Use preg_* functions which
are. No bug but lacking support (which will never be implemented).
Previous Comments:
------------------------------------------------------------------------
[2008-10-20 18:34:35] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46346&edit=1