Bug #64057 [NEW]: substr_replace failed charset utf-8
| From: | ltsujiguchi at gmail dot com | Date: | Wed, 23 Jan 2013 17:54:21 +0000 |
| Subject: | Bug #64057 [NEW]: substr_replace failed charset utf-8 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-176200@lists.php.net to get a copy of this message | ||
From: ltsujiguchi at gmail dot com
Operating system: Ubuntu 12.10
PHP version: 5.4.11
Package: Strings related
Bug Type: Bug
Bug description:substr_replace failed charset utf-8
Description:
------------
I had a problem when i used the substr_replace, using those changes os
php.ini:
I couldn't find the exact version of my php on the drop, so i put the
closest
version, but my real version is the 5.4.6.
Result expected:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%
Result returned:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE%é%?
Test script:
---------------
$replacement = '%é%';
$cond = 'noticia.noticia_titulo LIKE ? OR noticia.noticia_conteudo LIKE
?';
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
echo $cond;
--
Edit bug report at https://bugs.php.net/bug.php?id=64057&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64057&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64057&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64057&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64057&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64057&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64057&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64057&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64057&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64057&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64057&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64057&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64057&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64057&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64057&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64057&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64057&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64057&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64057&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64057&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64057&r=mysqlcfg