desperately looking for linux-64bits tester - Fw: [PEAR-DEV] run test on lastest PHP CVS snapshot on linux-64bit - Fw: Bug #42101 [Opn->Fbk]:
mb_substr error if length = PHP_INT_MAX

From: Date: Mon, 13 Aug 2007 12:22:43 +0000
Subject: desperately looking for linux-64bits tester - Fw: [PEAR-DEV] run test on lastest PHP CVS snapshot on linux-64bit - Fw: Bug #42101 [Opn->Fbk]:
mb_substr error if length = PHP_INT_MAX
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47774@lists.php.net to get a copy of this message
Please! This will help PHP be even better :-) Instructions below. This is just a few minutes work. Thanks, MC ----- Forwarded Message ---- From: Michel Corne <mcorne@yahoo.com> To: pear-dev@lists.php.net Sent: Saturday, August 4, 2007 4:30:38 PM Subject: [PEAR-DEV] run test on lastest PHP CVS snapshot on linux-64bit - Fw: Bug #42101 [Opn->Fbk]: mb_substr error if length = PHP_INT_MAX Hi everyone running linux 64-bit, I logged PHP Bug #42101: http://bugs.php.net/?id=42101. They are asking me to run the attached file on the latest PHP CVS snapshot. I do not have a 64-bit box. Would you mind installing the latest PHP snapshot: http://snaps.php.net/php5.2-latest.tar.gz, running the test: php bug.php (file attached), and sending me the report: bug.txt Many thanks, MC ----- Forwarded Message ---- From: PHP Bug Database <php-bugs@lists.php.net> To: mcorne@yahoo.com Sent: Wednesday, July 25, 2007 4:25:27 PM Subject: Bug #42101 [Opn->Fbk]: mb_substr error if length = PHP_INT_MAX ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=42101&edit=2 ID: 42101 Updated by: jani@php.net Reported By: mcorne at yahoo dot com -Status: Open +Status: Feedback Bug Type: mbstring related Operating System: RedHat Linux x86-64 PHP Version: 5.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2007-07-25 12:10:28] mcorne at yahoo dot com Description: ------------ mb_substr("\x44\xCC\x87", 0, PHP_INT_MAX, 'UTF-8') only captures the first character on linux 64-bit instead of returning the whole string. Note that this works fine on Windows XP and Linux 32-bit. Reproduce code: --------------- function substring($string, $length) { $substr = mb_substr($string, 0, $length , 'UTF-8'); $length = strlen($substr); $chars = $length? unpack("C{$length}chars", $substr) : array(); $decs = array_map('dechex', $chars); return array($substr, $decs); } $test['string'] = "\x44\xCC\x87"; $test['utf8'] = '\x44\xCC\x87'; $test['unicode'] = '\u0044\u0307'; $test['PHP_INT_MAX'] = PHP_INT_MAX; $test['php_int_max'] = substring($test['string'], PHP_INT_MAX); $test['9999'] = substring($test['string'], 9999); print_r($test); Expected result: ---------------- Array ( [string] => D&#775; [utf8] => \x44\xCC\x87 [unicode] => \u0044\u0307 [PHP_INT_MAX] => 2147483647 [php_int_max] => Array ( [0] => D&#775; [1] => Array ( [chars1] => 44 [chars2] => cc [chars3] => 87 ) ) [9999] => Array ( [0] => D&#775; [1] => Array ( [chars1] => 44 [chars2] => cc [chars3] => 87 ) ) ) Actual result: -------------- Array ( [string] => D&#775; [utf8] => \x44\xCC\x87 [unicode] => \u0044\u0307 [PHP_INT_MAX] => 2147483647 [php_int_max] => Array ( [0] => D [1] => Array ( [chars1] => 44 ) ) [9999] => Array ( [0] => D&#775; [1] => Array ( [chars1] => 44 [chars2] => cc [chars3] => 87 ) ) ) ------------------------------------------------------------------------ Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

« previous php.pear.dev (#47774) next »