Re: fputcsv() and $escape character

From: Date: Thu, 13 Sep 2018 15:55:20 +0000
Subject: Re: fputcsv() and $escape character
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-103159@lists.php.net to get a copy of this message
On Thursday, September 13, 2018 at 7:30 AM Christoph M. Becker <cmbecker69@gmx.de> wrote: >> Ironically, the League/Csv library uses fputcsv() behind >> the scenes, >> and thus suffers from the same escape character problem >> (see https://github.com/thephpleague/csv/issues/307). >> >> Is there any chance fputcsv() can be updated to allow >> setting a blank >> string as the escape character? As Christopher pointed out, this would >> not be a BC break, and while it wouldn't fix every issue with the >> function it would still be a step forward. Frankly I found it very >> surprising that the function *didn't* support passing a blank string. > > I've submitted > <https://github.com/php/php-src/pull/3515>. Thanks so much for your work on this! Do you know if the patch can be included in PHP 7.3? If the patch was also applied to PHP 7.2 and 7.1, we wouldn't need to add fallback code in the League/Csv library for these versions. I understand if this isn't possible, but I'm trying to figure out how best to approach fixing the issue in League/Csv.

« previous php.internals (#103159) next »