#30851 [Bgs]: Some char cann't be replaced.

From: Date: Sun, 21 Nov 2004 07:59:14 +0000
Subject: #30851 [Bgs]: Some char cann't be replaced.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69307@lists.php.net to get a copy of this message
ID: 30851 Updated by: tony2001@php.net Reported By: ibar at 163 dot com Status: Bogus Bug Type: Regexps related Operating System: RH9 PHP Version: 4.3.9 New Comment: You need to enable mbstring extension first. http://php.net/mbstring Previous Comments: ------------------------------------------------------------------------ [2004-11-21 08:52:58] ibar at 163 dot com Call to undefined function: mb_eregi_replace() How to use mb_eregi_replace ? ------------------------------------------------------------------------ [2004-11-21 08:32:24] tony2001@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php POSIX regexps doesn't support multibyte symbols. You should use mb_eregi_replace() instead. ------------------------------------------------------------------------ [2004-11-20 15:57:20] ibar at 163 dot com Description: ------------ When I use the eregi_replace function, I can't replace the traditional chinese letter "4" with the simplified chinese letter "4". But the str_replace function can do. Can you tell me which function can be used to complete it? PS: the tradional chinese letter "4"'s specific character is 0xA57C. But the problem appeared when replaced to the letter "7C" . Reproduce code: --------------- $Strings="i am ¥| ^o^"; print eregi_replace("¥|","4",$Strings); Expected result: ---------------- i am 4 ^o^ Actual result: -------------- Warning: ereg_replace(): REG_EMPTY in /home/site/math.php on line 9 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30851&edit=1

« previous php.bugs (#69307) next »