Bug #12176 Updated: eregi_replace() doesn't work properly with Russian charset
| From: | vlad@php.net | Date: | Mon, 16 Jul 2001 21:33:12 +0000 |
| Subject: | Bug #12176 Updated: eregi_replace() doesn't work properly with Russian charset | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-60123@lists.php.net to get a copy of this message | ||
ID: 12176
Updated by: vlad
Reported By: ruslan2000@mail.com
Old Status: Open
Status: Closed
Bug Type: Unknown/Other Function
Operating System: Windows 2000
PHP Version: 4.0.6
New Comment:
I do not think that eregi_replace() works with cp-1251 charset, or any other Russian charset for
that matter (there are like 4 or 5 of them out there). And I do not think it ever will. After all,
there are other languages that use the same character numbers as cp-1251, and making it work with
one will clash with the other...:(
Vlad
Previous Comments:
------------------------------------------------------------------------
[2001-07-15 10:01:31] ruslan2000@mail.com
<?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 :((
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12176&edit=1