I need to export a .csv file with php. I used below code to do that:
header('Content-Encoding: UTF-8');
header('Content-type: application/csv; charset=UTF-8');
header("Content-Disposition: attachment; filename=$fn");
echo "\xEF\xBB\xBF"; // UTF-8 BOM
print($csv);
$csv contains some persian characters. When i opened the exported file with ms excel, wrong characters showed. When i opened file with notepad characters showed right.
how can i solve this problem?