#33179 [Opn->Bgs]: backslash is not an escape character in correct CSV
| From: | iliaa@php.net | Date: | Mon, 30 May 2005 23:18:41 +0000 |
| Subject: | #33179 [Opn->Bgs]: backslash is not an escape character in correct CSV | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79730@lists.php.net to get a copy of this message | ||
ID: 33179
Updated by: iliaa@php.net
Reported By: fsb at thefsb dot org
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: os x 10.3 and freebsd 5.3
PHP Version: 4.3.10
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
As far as PHP is concerned backslash is an escape characte, which makes
the demonstrated behaviour expected.
Previous Comments:
------------------------------------------------------------------------
[2005-05-30 02:22:52] fsb at thefsb dot org
Description:
------------
why can i have a \ at the end of a field but not
if i wrap it in " field delimiters? e.g.
abc,123\,abc works fine but
"abc","123\",abc produces only two columns
this question has been asked before (#29278, #30476,
etc.) and iliaa@php.net rejects the bug as bogus. i
don't agree.
if this is not a bug then this unusual use of \ to
escape only closing field delimiting double quotes
but not escape any other instances of double qotes or
(it would appear) any other character SHOULD be
documented. it is not.
moreover this undocumented feature is not consistent
with the specification of the CSV file format found
here: http://www.creativyst.com/Doc/Articles/CSV/
CSV01.htm
this csv spec suggests that backslash has no special
meaning in the CSV format at all. indeed, in all my
tests, fgetcsv appears to accord it no special meaning
_except_ in this one particular case.
such a surprising behaviour that deviates from common
CSV file format conventions SHOULD be documented (or
corrected).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33179&edit=1