#29278 [NEW]: fgetcsv() problems with \ at the end of a field
| From: | jens at girbert dot de | Date: | Tue, 20 Jul 2004 10:59:24 +0000 |
| Subject: | #29278 [NEW]: fgetcsv() problems with \ at the end of a field | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-62711@lists.php.net to get a copy of this message | ||
From: jens at girbert dot de
Operating system: Windows
PHP version: 4.3.7
PHP Bug Type: Filesystem function related
Bug description: fgetcsv() problems with \ at the end of a field
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 bug report at http://bugs.php.net/?id=29278&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29278&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29278&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29278&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29278&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29278&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29278&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29278&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29278&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29278&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29278&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29278&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29278&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29278&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29278&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29278&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29278&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29278&r=float