From: great_boba at yahoo dot com Operating system: Suse PHP version: 5.2.6 PHP Bug Type: Filesystem function related Bug description: Strange behavior of fgetcsv
Description: ------------ I try to write some application which parse csv-dump. Below I write little example to show strange things. Reproduce code: --------------- 1.csv "A","B","C" "A","B "","C """ 1.php <?php $fp=fopen('1.csv',r'); while($data=fgetcsv($fp,4096,',')) print_r($data); fclose($fp); ?> Expected result: ---------------- Array { [0]=>A [1]=>B [2]=>C } Array { [0]=>A [1]=>B " [2]=>C "" } Actual result: -------------- Array { [0]=>A [1]=>B [2]=>C } Array { [0]=>A [1]=>B ",C """ } -- Edit bug report at http://bugs.php.net/?id=44979&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44979&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44979&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44979&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44979&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44979&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44979&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44979&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44979&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44979&r=support Expected behavior: http://bugs.php.net/fix.php?id=44979&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44979&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44979&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44979&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44979&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44979&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44979&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44979&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44979&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44979&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44979&r=mysqlcfg