ob_start();
echo 'Dés?àui';
header("Content-Type: application/vnd.ms-excel; charset=utf-8");
header("Content-type: application/x-msexcel; charset=utf-8");
header("Content-Disposition: attachment; filename=Test.xls");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
ob_end_flush();
What I'm getting in the excel file is D??s?§??ui
However, I do get Dés?àui when I try
ob_start();
echo 'Dés?àui';
header("Content-Type: text/html; charset=utf-8");
ob_end_flush();
Any help experts?
PS. The file is saved in DW with Title/Encoding Unicode(Utf-8).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…