On 21 September 2017 at 12:43, Christoph M. Becker <cmbecke...@gmx.de> wrote:
> Hi everybody!
>
> There are several bug reports regarding "broken" fputcsv() behavior in
> our tracker, namely, because the $escape parameter causes unexpected
> results.  For instance:


I looked at fixing some of the CSV related bugs about a year or so
ago. My conclusions were:

i) There is no way to fix the problems that wouldn't cause horrible BC
breaks for code that is only coincidentally working currently.

ii) Handling strings in C is much more error prone than handling them in PHP.

I'm reasonably certain that trying to fix the current functions is the
wrong approach, and one of the following would be much better.

Either, find a C library that has already been proven to handle CSV
parsing/generating 'correctly' and bring that into PHP core under
either new function names or namespace.

Or, write the code in PHP (or just use
https://github.com/thephpleague/csv) and find a way to make that fast
enough for people to use.

Touching the existing code is pretty certain to bring a lot of pain,
without resulting in a fully compliant csv parser/generator.

cheers
Dan
Ack

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to