#22330 [Opn->Csd]: Overloaded strrpos() gives wrong results

From: Date: Thu, 20 Feb 2003 17:55:26 +0000
Subject: #22330 [Opn->Csd]: Overloaded strrpos() gives wrong results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33746@lists.php.net to get a copy of this message
ID: 22330 Updated by: moriyoshi@php.net Reported By: david at santinoli dot com -Status: Open +Status: Closed Bug Type: mbstring related Operating System: Linux PHP Version: 4.3.1 New Comment: Your patch has just been committed to CVS. Thanks for the report! Moriyoshi Previous Comments: ------------------------------------------------------------------------ [2003-02-20 06:28:46] david at santinoli dot com With php_value mbstring.internal_encoding "UTF-8" php_value mbstring.func_overload 6 in my php.ini, the overloaded strrpos() gives a wrong result when parsing an UTF-8 string. For example, $s=iconv("ISO-8859-1","UTF-8","é.jpg"); $x=strrpos($s,"."); assigns the value 2 to $x, instead of the correct one (1). My PHP was configured with ./configure --with-config-file-path=/etc/httpd/conf --with-apxs --with-pgsql --with-iconv --enable-mbstring --enable-mbregex A patch which fixes this bug can be found at http://village.flashnet.it/users/mi1802/php-4.3.1-mbstring.diff Cheers, David ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22330&edit=1

« previous php.bugs (#33746) next »