php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50885 srt_replace() function don't work.
Submitted: 2010-01-30 11:18 UTC Modified: 2010-01-30 15:41 UTC
From: tenz699 at hotmail dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.2.12 OS: FreeBSD 6.4-RELEASE-p8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
39 - 37 = ?
Subscribe to this entry?

 
 [2010-01-30 11:18 UTC] 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('&#3851;','-', '&#3942;&#3851;&#3942;&#3954;&#3851;&#3908;&#3851;');
echo "\n<br>";
echo str_ireplace('x',' &#3851;', 'x - x');
?>

Expected result:
----------------
&#3942;-&#3942;&#3954;-&#3908;-
 &#3851; -  &#3851;

Actual result:
--------------
-------
 ? - ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-30 11:27 UTC] 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 15:41 UTC] jani@php.net
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."

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 23:01:28 2024 UTC