[PHP-DEV] Re: [PHP3] CSV conversion. Inclusion in PHP? From: Nick Talbott (nickt <email protected>)
Date: 04/28/99

Hi, Cameron

I'm glad the code does what you want.

[snip]

>One thing I did note is that you didn't mention if you took into account
CRLF within a quoted field?
>I was told this was part of the CSV spec?

I've not seen any reference anywhere about CRLF being valid within a quoted
field. My code is based on the assumption that one record = one line, so
will fail to parse the data correctly on records that have an embedded end
of line.

>As for including it within PHP I ask the developers, I have looked at the
manual on how to add
>functions to php.
>How can we go about getting this put in the main PHP release?

It appears this will now be going into the next release of PHP, so the issue
of whether CRLF in quoted fields is valid needs to be sorted. Perhaps
others on the list can comment?

>Also if we can get this added to the PHP CVS I will try and write the
trivial fputcsv( ) to
>write the a record to a CSV file. :)

That would round things off nicely.

Regards - Nick

Nick Talbott
Corporate IT Unit, Powys County Council, UK

email nickt <email protected>
FAX +44 (0) 1597 824781
web http://www.powys.gov.uk

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>