#29278 [Opn->Bgs]: fgetcsv() problems with \ at the end of a field
| From: | iliaa@php.net | Date: | Tue, 20 Jul 2004 21:47:52 +0000 |
| Subject: | #29278 [Opn->Bgs]: fgetcsv() problems with \ at the end of a field | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63201@lists.php.net to get a copy of this message | ||
ID: 29278
Updated by: iliaa@php.net
Reported By: jens at girbert dot de
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows
PHP Version: 4.3.7
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Escaping " makes the parser skip over that character.
Previous Comments:
------------------------------------------------------------------------
[2004-07-20 12:59:23] jens at girbert dot de
Description:
------------
When reading a comma separated file with fgetcsv, the function does not
split the fields correctly in following conditions:
-backslash \ at the end of a field
and
-fields are enclosed by ""
the following line from the csv-file is read with a wrong result:
"test1\","test2","test3"
There are only 2 fields in the array returned by fgetcsv:
[0] => test1\",test2
[1] => test3
Expected is:
[0] => test1\
[1] => test2
[2] => test3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29278&edit=1