note 92114 deleted from function.fgetcsv by danbrown
| From: | danbrown@php.net | Date: | Thu, 09 Jul 2009 14:00:52 +0000 |
| Subject: | note 92114 deleted from function.fgetcsv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158104@lists.php.net to get a copy of this message | ||
Note Submitter: raulvictor at gmail dot com
----
fgetcsv() do unwanted "left trim" on fields started with locale characters like
"Ãngel".
One possible solution:
$fp = fopen ($file , "r" );
//while (( $data = fgetcsv ( $fp , 1000 , "|" )) !== FALSE ) {
while ($line_ = fgets( $fp, 1000 )){
$data = (split(",", $line_));
.....
.....
}
}