#29163 [Asn]: field consisting of one space char is read as an empty string by fgetcsv

From: Date: Wed, 21 Jul 2004 03:54:08 +0000
Subject: #29163 [Asn]: field consisting of one space char is read as an empty string by fgetcsv
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-63208@lists.php.net to get a copy of this message
ID: 29163 User updated by: ramon_herrera at eloyalty dot com Reported By: ramon_herrera at eloyalty dot com Status: Assigned Bug Type: Filesystem function related Operating System: win2k & GNU/Linux (FC2) PHP Version: 5.0.0 Assigned To: moriyoshi New Comment: Is this a matter of compatibility versus correctness? What is the consensus among the developers/maintainers regarding this matter? Thanks again. Previous Comments: ------------------------------------------------------------------------ [2004-07-20 23:23:03] moriyoshi@php.net *sigh* as I mentioned again and again, whether it's correct or not doesn't matter. Personally I'm for Ilia's opinion, but compatibility should always come first. ------------------------------------------------------------------------ [2004-07-20 23:07:08] iliaa@php.net Current PHP 4 behavior is correct, old behavior was wrong. Opening the given file with other CVS parsers such as OpenOffice confirms that the PHP 4 behavior is correct. ------------------------------------------------------------------------ [2004-07-20 22:53:59] ramon_herrera at eloyalty dot com The version 4.3.8 fgetcsv() works fine. It reads a single space character from a CSV field containing a single space character. If that is what my data is then that is exactly what I want fgetcsv() to read. The version 5.0.0 fgetcsv() drops that space character. Thank you very much for your efforts. ------------------------------------------------------------------------ [2004-07-20 22:40:06] moriyoshi@php.net The reported behaviour is inconsistent with these of older versions prior to 4.3.4. Assigning to the person who broke it. ------------------------------------------------------------------------ [2004-07-15 18:07:12] ramon_herrera at eloyalty dot com Version 4.3.8 results are identical to the version 4.3.7 results. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29163 -- Edit this bug report at http://bugs.php.net/?id=29163&edit=1

« previous php.bugs (#63208) next »