#34479 [Asn->Fbk]: mb_strpos returns bad results with UTF-8 strings

From: Date: Sun, 13 Nov 2005 20:09:44 +0000
Subject: #34479 [Asn->Fbk]: mb_strpos returns bad results with UTF-8 strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88111@lists.php.net to get a copy of this message
ID: 34479 Updated by: moriyoshi@php.net Reported By: devilio at gmail dot com -Status: Assigned +Status: Feedback Bug Type: mbstring related Operating System: Debian Sarge PHP Version: 4.4.0 Assigned To: moriyoshi New Comment: Seems like the octets in your example that is supposed to represent a UTF-8 character is not a valid UTF-8 sequence. Could you please provide the exact string that you fed to mb_strpos() ? Previous Comments: ------------------------------------------------------------------------ [2005-09-12 14:12:40] sniper@php.net Assigned to maintainer. ------------------------------------------------------------------------ [2005-09-12 14:04:46] devilio at gmail dot com Description: ------------ mb_strpos returns wrong value with some UTF-8 strings Reproduce code: --------------- echo(mb_strpos('¿¬hello', 'hello', 0, 'UTF-8')); Expected result: ---------------- 2 Actual result: -------------- 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34479&edit=1

« previous php.bugs (#88111) next »