Answers for "how to make a cvs file as UTF 8 encoded"

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

encode file to utf-8 in java

String charset = "ISO-8859-1"; // or what corresponds
  BufferedReader in = new BufferedReader( 
      new InputStreamReader (new FileInputStream(file), charset));
  String line;
  while( (line = in.readLine()) != null) { 
    ....
  }
Posted by: Guest on June-26-2020

Code answers related to "how to make a cvs file as UTF 8 encoded"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language