eregi_replace() doesn't work properly with Russian charset

From: Date: Sun, 15 Jul 2001 14:05:59 +0000
Subject: eregi_replace() doesn't work properly with Russian charset
Groups: php.dev 
Request: Send a blank email to php-dev+get-60052@lists.php.net to get a copy of this message
Hello , From: ruslan2000@mail.com Operating system: Windows 2000 PHP version: 4.0.6 PHP Bug Type: Unknown/Other Function Bug description: eregi_replace() doesn't work properly with Russian charset <?php /**** Russian word "бог" equal to word "god" in English I was expected that eregi_replace() did the following found the word "god" in the $header and changed it to %#&# (it should work with "GOD", "God", "GOd" and etc.) so with English word it works just ok! but then I'm try to use it with Russian word in the win1251 encoding it's fails (but in my opinion it should work with "БОГ", "Бог", "БОг" and etc.)****/ $header = "... БОГ ..."; //contains word "GOD" (in Russian (win1251)) $header = eregi_replace ("бог", "%#&#", $header);//try to change word "бог" to %#&# echo $header; // returns the $header unchanged :(( ?> Warning: Could not execute mail delivery program in /local/Web/sites/phpweb/bugs.php on line 101 Mail not sent! Please send this page in a mail to php-dev@lists.php.net manually. -- Best regards, Ruslan mailto:ruslan2000@mail.com

« previous php.dev (#60052) next »