php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12176 eregi_replace() doesn't work properly with Russian charset
Submitted: 2001-07-15 10:01 UTC Modified: 2001-07-16 17:33 UTC
From: ruslan2000 at mail dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ruslan2000 at mail dot com
New email:
PHP Version: OS:

 

 [2001-07-15 10:01 UTC] ruslan2000 at mail dot 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 :((
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-16 17:33 UTC] vlad@php.net
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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC