#41807 [Opn->Fbk]: ereg_replace adds a ‘ at the end of output

From: Date: Wed, 27 Jun 2007 11:36:16 +0000
Subject: #41807 [Opn->Fbk]: ereg_replace adds a ‘ at the end of output
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114319@lists.php.net to get a copy of this message
ID: 41807 Updated by: tony2001@php.net Reported By: untxen at gmail dot com -Status: Open +Status: Feedback -Bug Type: *Languages/Translation +Bug Type: Unknown/Other Function Operating System: Debian PHP Version: 4.4.7 New Comment: Cannot reproduce. Previous Comments: ------------------------------------------------------------------------ [2007-06-26 08:13:54] untxen at gmail dot com Description: ------------ function ereg_replace seems to add the replacement string at the end of the string when the replacement is a special character (utf-8 code) and the pattern is \'. using mb_ereg_replace the problem is solved, but ereg_replace works wrong Reproduce code: --------------- echo ereg_replace("\'","‘","hola"); Expected result: ---------------- I expect this as a result: hola because there isn't a ‘ in text hola Actual result: -------------- it actually outputs: hola‘ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41807&edit=1

« previous php.bugs (#114319) next »