0

I am facing problem with charset=utf-8,basically i am generating csv file using php but when i open this file on Libra office its asking me for uni code and showing 敄慴汩䌠湡楤慤整删䝁删灥牯,if I select uni code to utf-8 its working,how i can set uni code though my code.

$output = "Detail Report";
$filename =  $assesseeName.".csv";
header('Content-type: application/csv; charset=utf-8');
header('Content-Disposition: attachment; charset=utf-8 ;filename='.$filename);
echo $output;
exit;
Muhammad Rashid
  • 563
  • 1
  • 6
  • 25
  • possible duplicate of [Microsoft Excel mangles Diacritics in .csv files?](http://stackoverflow.com/questions/155097/microsoft-excel-mangles-diacritics-in-csv-files) – deceze Apr 10 '14 at 15:17
  • The HTTP meta headers have no influence here. The file is saved to disk, the HTTP headers aren't stored anywhere, and when you double click the file to open it Libre Office/Excel deals with the file itself regardless of what headers you set. – deceze Apr 10 '14 at 15:18

0 Answers0