Req #38301 [Opn->Csd]: field enclosure behavior in fputcsv
| From: | cmb@php.net | Date: | Sat, 15 Dec 2018 13:42:19 +0000 |
| Subject: | Req #38301 [Opn->Csd]: field enclosure behavior in fputcsv | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218463@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=38301&edit=1
ID: 38301
Updated by: cmb@php.net
Reported by: programmer at tklee dot com
Summary: field enclosure behavior in fputcsv
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Filesystem function related
Operating System: Linux
PHP Version: 5.1.4
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Implemented as commit 3b0f051[1]; available as of PHP 7.4.0.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=3b0f05119383fe21ee75adaed3d0239ba8976aef>.
Previous Comments:
------------------------------------------------------------------------
[2018-09-13 12:36:31] cmb@php.net
<https://github.com/php/php-src/pull/3515>
would implement this
feature request.
------------------------------------------------------------------------
[2018-09-13 12:35:47] cmb@php.net
Related To: Bug #43225
------------------------------------------------------------------------
[2018-09-12 22:53:36] cmb@php.net
Related To: Bug #74713
------------------------------------------------------------------------
[2014-12-04 08:09:59] programmer at tklee dot com
Wow! After 8.5 years! That's dedication!
Thank you for your answer to issue 2.
If we can address issue 1, then issue 2 can be solved at the same time. Allowing "" to be
the quote char is actually a closer implementation of RFC 4180. Users can choose whether or not to
enclose the field with something.
In short, can we accept "" as the 4th parameter of fputcsv?
Thanks for reconsidering.
------------------------------------------------------------------------
[2014-12-02 23:57:26] datibbaw@php.net
As far as expected behaviour goes, RFC 4180 states:
> Each field may or may not be enclosed in double quotes
Also, there's a provision that states:
> Spaces are considered part of a field and should not be ignored.
That said, while I agree that spaces (or tabs, if not the delimiter) in a field do not strictly
require an enclosure (unlike newlines or the enclosure character itself), the only thing coming
close to a standard doesn't forbid it.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=38301
--
Edit this bug report at https://bugs.php.net/bug.php?id=38301&edit=1