I generate csv with PHP
but some Greek letters appear as “???” HOW APPEAR THEM IN GREEK IN CSV…?
how to fix???
csv go to server and ftp download it… I have Linux live server and local XAMPP …WINDOWS
$fp = fopen('file3000.csv', 'w');
fputcsv($fp, array("carId","make","carYear","carPrice","ac","LOCATION","TEL1","sponsoredCar","img"));
<loop>
fputcsv($fp, array($carId,$make,$carYear,$carPrice,$ac,$LOCATION,$TEL1,$sponsoredCar,$img));
fclose($fp);
Gandalf
2
this do not explain clearly… for greek/english chars what should use?
cpradio
4
after try and read
this worked thks
in db => generate csv
mysql_query("SET NAMES utf8"); // before make / execute query
in differ php file get csv and regenerate it
header("content-type:application/csv;charset=UTF-8");
header("Content-disposition: filename=v1.csv"); // destination
print "\xEF\xBB\xBF"; // UTF-8 BOM
readfile("file3000.csv"); // source
exit;
system
Closed
6
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.