#50885 [Fbk->Bgs]: srt_replace() function don't work.
| From: | jani@php.net | Date: | Sat, 30 Jan 2010 15:41:09 +0000 |
| Subject: | #50885 [Fbk->Bgs]: srt_replace() function don't work. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-147065@lists.php.net to get a copy of this message | ||
ID: 50885
Updated by: jani@php.net
Reported By: tenz699 at hotmail dot com
-Status: Feedback
+Status: Bogus
Bug Type: Strings related
Operating System: FreeBSD 6.4-RELEASE-p8
PHP Version: 5.2.12
New Comment:
User reply: "It was't a bug, but an encoding issue. But was surprise to
find 2 php versions handled differently. The problem is solved when i
save the file a utf-8 without BOM."
Previous Comments:
------------------------------------------------------------------------
[2010-01-30 11:27:55] jani@php.net
Is this really what you tried? Since that works just fine. Or did your
script originally contain some unicode chars or something like that? In
latter case it might be good if you provided the script downloadable
somewhere..
------------------------------------------------------------------------
[2010-01-30 11:18:38] tenz699 at hotmail dot com
Description:
------------
echo str_ireplace('་','-',
'ས་སི་ང་');
or
echo str_ireplace('x',' ་', 'x - x');
don't work on php 5.2.12, it used to work without any problem on php
5.2.6
Reproduce code:
---------------
<?php
echo str_ireplace('་','-',
'ས་སི་ང་');
echo "\n<br>";
echo str_ireplace('x',' ་', 'x - x');
?>
Expected result:
----------------
ས-སི-ང-
་ - ་
Actual result:
--------------
-------
? - ?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50885&edit=1