note 118122 rejected from function.file by cmb
| From: | cmb@php.net | Date: | Tue, 15 Dec 2015 16:32:23 +0000 |
| Subject: | note 118122 rejected from function.file by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-204377@lists.php.net to get a copy of this message | ||
Note Submitter: scott dot chu at udngroup dot com
----
Martin K.'s post quoted: "If the file you are reading is in CSV format do not use file(),
use fgetcsv(). file() will split the file by each newline that it finds, even newlines that appear
within a field (i.e. within quotations).". He is right. However, in my case, fgetcsv has
problem on dealing with Chinese characters, so I can't use it either.
I'm currently trying to figure out how to read in a csv line that has linefeed character in
some field's contents from a csv file pleasantly though there are some ugly ways to do it.