Answers for "php read csv as utf8"

PHP
0

fgetcsv utf8_encode

$csvFile = fopen('file/path', "r");
fgetcsv($csvFile);
while(($row = fgetcsv($csvFile, 1000, ";")) !== FALSE){        
  for ($c=0; $c < count($row); $c++) {
    echo iconv( "Windows-1252", "UTF-8", $row[$c]);
  }
}
fclose($csvFile);
Posted by: Guest on July-02-2021
0

csv utf-8 excel into php

mb_convert_encoding($csv, 'UTF-16LE', 'UTF-8');
Posted by: Guest on August-17-2020

Browse Popular Code Answers by Language