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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon Apr 29 02:01:29 2024 UTC