I generate csv with PHP ...but some Greek letters appear as "?"

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);

It is most likely the file encoding. The followign might help:
http://stackoverflow.com/questions/2048347/how-to-specify-encoding-while-process-csv-file-in-php

this do not explain clearly… for greek/english chars what should use?

Have you looked at doing this to write your output out?
http://stackoverflow.com/questions/17592707/php-export-csv-when-data-having-utf8-charcters

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;

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.