Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113603 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68747 invoked from network); 18 Mar 2021 15:00:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Mar 2021 15:00:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E9F25180503 for ; Thu, 18 Mar 2021 07:54:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 18 Mar 2021 07:54:14 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id a1so7878123ljp.2 for ; Thu, 18 Mar 2021 07:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chall-id-au.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=Re1sURxH+3lKDCwaG0yngzjMrgVP3N72DycnO+MImow=; b=NstSLRDEe8Fzfmhbjda5a1yIM71NHhtanfx0rCC9R6yxchMjTO/R1D2+AJGz1Hoosb H6MOKx3tCuKhapaKrLsUsEVir/WgV1U1xJTRYZ7d6spHYZ6RAmvvbk7MMyVInWNrPlKH jnXd2Uau5/Z5TkaNfAgzm3XMU8qbtcpKQ61DPj8j6UyRDURQPeu/ffqIJVoRew5u9YVB ACmjaVl9B72CU98RcB2XzeDgyEIBwgFrCt+8ET+Vs9LlOrqPX1hCcq6nmNCe6EGnZcLd 9N6OuwFL4wvoOq+FvPDcF3zB7na+u3Gp1HLgkWV26550f4pll/zhOZcfEIwnxU/28Ue+ zk0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Re1sURxH+3lKDCwaG0yngzjMrgVP3N72DycnO+MImow=; b=Ho9xGJ1798R8iUXUiEhm1gJ8O7Jh1O01h/poxGw5Fy5f9NrUrL3I6kCxTvmUfmGKLr 6i92xksfHCg3Q8KdVu2rcraLe8HVM788KU1DktvADfnQs84dLeATGoiIljKxToem563w sGGmixR7fA+hOPZm2S49yq96RQIKSJk9tw3rtEgUx99R2iD6t89+dwOkz0bCa6Uwx50e keZU53mYA5r0QWmEwHmRIXLCUnc5V81gmq1FsabCmOe/tWgmBZeXEwMm/ghpKbpHaOEr R6CIarbAcXZZny6Jro1/X3RthXbaX7Y7c6LwjOH/+PBlCUnD3JksJ5/CX1FakrRElWkL UQqg== X-Gm-Message-State: AOAM532ydkf4k8nRXa4YFnHSwdzY/q4KXuJLcjvDpTKYP5kT0slfgVUd XGYBk9xcfJnp+Ki2vEW0ISDATHIhZLxgFM/dWold78TGfgV6Z2tb X-Google-Smtp-Source: ABdhPJxuz7jvGJ1Son+L5eKpmfmesWcElLB7D8Ak79Xqg95UGvV4cEs15r9IuAICqYsI0fHei04KZG6R4V/1j9HtVlQ= X-Received: by 2002:a2e:a415:: with SMTP id p21mr2329284ljn.108.1616079252022; Thu, 18 Mar 2021 07:54:12 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 19 Mar 2021 01:54:00 +1100 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000bef96805bdd0c522" Subject: Enhancement to fputcsv From: me@chall.id.au (Cameron Hall) --000000000000bef96805bdd0c522 Content-Type: text/plain; charset="UTF-8" Hi internals, I sent an email[1] to the list about this in November, which didn't gain much traction. I've created a pull request[2] which adds an optional parameter for line endings to the fputcsv function. This enhancement addresses three issues on the bug tracker, all of which are about the function being non-compliant with RFC 4180[3]. To summarise the issue; the function uses NL as its EOL character when the RFC stipulates that it should be CRLF. To maintain backward compatibility the function still defaults to NL, but this enhancement gives you the ability to provide a different character sequence instead. I'm hoping this gains some interest this time, even though it is quite insignificant. Kind regards, Cameron [1] https://externals.io/message/112248 [2] https://github.com/php/php-src/pull/6403 [3] https://tools.ietf.org/html/rfc4180 ReplyForward --000000000000bef96805bdd0c522--