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

From: Date: Tue, 20 Jul 2004 21:23: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-63199@lists.php.net to get a copy of this message
 ID:               29163
 Updated by:       moriyoshi@php.net
 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:

*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.



Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2004-07-15 06:50:20] ramon_herrera at eloyalty dot com

(Ignore this comment.  I just needed to clarify the bug category.)

------------------------------------------------------------------------

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


Thread (19 messages)

« previous php.bugs (#63199) next »