Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100750 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26118 invoked from network); 22 Sep 2017 11:20:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2017 11:20:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:53918] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/CB-62331-012F4C95 for ; Fri, 22 Sep 2017 07:20:49 -0400 Received: from [192.168.2.106] ([79.243.117.113]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MV1wf-1dsDuD3eCD-00YRGk; Fri, 22 Sep 2017 13:20:45 +0200 To: Rowan Collins , internals@lists.php.net References: <7cf5adb8-0738-259e-6d1e-f966722fdae2@gmx.de> Message-ID: <2e92a618-c053-0434-bbf4-511892d41758@gmx.de> Date: Fri, 22 Sep 2017 13:20:43 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:qcUgufJZensj9PZFkW+1ocKPDT7xE7UNf3M3TUHbgavrRts4Fxt pxLF0LhoJK9xL1UnRJ9yUlz5XUD8v7hg30To2G8pGBvDazEx6X97QxuqUdHakh8+AUHgKvm DYeWzUHzjiHcNIczn1lk5v7gLhEvxbuTdOyxFAJjD54Q4q1kJi+F6I8xLqcG2N7oWmJfvHf i9GkJTFz/xXUnFoAnkS/g== X-UI-Out-Filterresults: notjunk:1;V01:K0:J09BMiczfN0=:ykPNcULiZ6oMBSb80usS5A O0fCYhbKYaB8d121N9OJpkJhTiiXCwd3tXuF44bsOgzrGSe3E2/5WE1ZARdLGTet65Wmd4Kgt 123G0zWlh//WyBaOAxTAE1eB+3AXGx/MPhNOTtKlswGBjW3Da5BQ/XSuVMOMyDXcMbu+oOsCf W2PgqEgILggVia7EJtEwXww0xxu2mMLmOwmnXa82vN6X5UpaZk0b7Book1zIRpjQwAklfSGV4 ZfMuHPFXopCxBFPqcQfh9IRyGpsTY0AWYoqtyta/ggCzVTFUtD04D2lJFpAtXGoRHIzb5R4ea P9aQqj97zpv8uxu9dRPYUpVFZKR22W3SmpQHMLqh8z8COqUlXjAuymPYqYGv0UIuIN/4nKF0d VYoydVBbQlXXbA4TylnjAbHcZdjNtUHiCj/34hmTxz5kxhDbeSH5Udf8luo77QDKpBve+/MGk So/NYXpMrZNCBq1FHgn+49zdMCbocPMgvpiwBesp4hSDghE/gQADD2yasbn0Z8V54Qgxy1+TM ySqVQNghGhD1TE8aIZII1gJGoHsnoPaiTeSOJiQu+FmcI83sPoAD2BMa6cnPS4E04/aCPad6U wXcXPtARVaZbdaDpo2kiipwEN/xrnEOF+dlA4oXgzThmr7ZqPg5IuAj1tLiDjPJGozbLfsL4D sWFqywgEglmsIT+uAf7XC5jU6MGbFGQy3nRQ+Mtk9Na57qVwK9J+nerdvBBsOeEITGci8FDZK pGbcD14zm1+WmQeLg9okuYUGHEof3oa545NUVehn2ImS8Kl1OuObCKAZLnQdp0yyWGJ30gkF2 VhbusQkrPoDdsfXo9CKMy9XRnaTofL/XcRpOCS0OazfB0c9Plg= Subject: Re: [PHP-DEV] fputcsv() and $escape character From: cmbecker69@gmx.de ("Christoph M. Becker") On 21.09.2017 at 20:01, Rowan Collins wrote: > On 21 September 2017 18:32:57 BST, Andreas Hennings wrote: > >> So empty string would enable the standard behavior RFC 7111 with no >> escape char. >> If so, I support this. > > Just a note regarding standards: Actually, there is no accepted standard regarding CSV. RFC 7111 is just an update to RFC 4180 (sorry, I've messed that up), but anyway both are just informational. > please make sure the behaviour of common applications, most notably > Excel, is considered and tested. In my experience it has its own quirks, > and it's likely that a large proportion of users require > interoperability with it. It may be there's nothing relevant to > consider, but I thought I'd mention it, in case people get too caught up > with a specification that nobody actually follows. That's exactly the point of this proposal. As it is, fputcsv() outputs CSV that won't be understood by Excel (or any other CSV aware implementation I'm aware of), as soon as the escape character is actually part of any string. So being able to avoid any such escaping would be helpful wrt. major CSV implementations, and making that the default even more so. The only other issue that I can see is that currently our fputcsv() hard-codes the line endings to LF (while RFC 4180 demands CRLF), but that may not be a real problem anymore. (Well, there might be issues with non ASCII compatible character encodings as well). -- Christoph M. Becker