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

From: Date: Thu, 12 Aug 2004 06:25:03 +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-64466@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: The bug still shows up in CVS php5-200408120430 under Fedora Core 2. Previous Comments: ------------------------------------------------------------------------ [2004-08-04 08:33:33] ramon_herrera at eloyalty dot com Is this bug destined to be fixed in a later release? ------------------------------------------------------------------------ [2004-07-21 05:54:07] ramon_herrera at eloyalty dot com Is this a matter of compatibility versus correctness? What is the consensus among the developers/maintainers regarding this matter? Thanks again. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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 (#64466) next »