[EMAIL PROTECTED] wrote:

> ID: 14658
> Updated by: derick
> Reported By: [EMAIL PROTECTED]
> Old Status: Open
> Status: Bogus
> Bug Type: Feature/Change Request
> Operating System: Linux, Solaris, Windows
> PHP Version: 4.1.0
> New Comment:
> 
> We are aware of this situation, and after some discussion on the
> mailinglist, we will not change it back. However, to read CSV files, there
> is function fgetcvs (http://www.php.net/manual/en/function.fgetcsv.php)
> which should do exactly what you want.
> 
> Derick
> 
> Previous Comments:
> ------------------------------------------------------------------------
> 
> [2001-12-22 05:46:46] [EMAIL PROTECTED]
> 
> The change made in 4.1.0 to strtok() destroyed my applications from the
> past 4 years! Thats because I used strtok() to read data from CSV (comma
> separated values) files - for which it works perfektly! For CSV (not only
> separated with commans - also with | and other symbols) it is required
> that EMPTY fields will be reported as empty field!!! So the change you
> made brokes my existing applications.
> 
Or one can use split() 

Lenar

> For parsing tokens as explained I understand the change - because there
> you wont need empty tokens! But for real parsing strtok is useless(!)
> because you always have more than one separator - for human language
> parsing you need space, return/line feed, full stop as well as comma,
> questionmark etc. as separators! strtok() fails here as it seems to me!!!
> 
> So my suggestion ist - to restore the old behaviour for CSV parsing and
> adding a new command like strparse() that will work with a list of
> separators!!!
> 
> 
> Greetings
> 
> Dipl.-Inform. Kai Hofmann
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> Edit this bug report at http://bugs.php.net/?id=14658&edit=1

-- 
Lenar Lõhmus
Vision Group

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to