爲了創建包含希臘字符的xls文件,我使用了下列標題。用希臘字符創建excel
第一次嘗試:
header("Content-Type: application/$file_type;charset=utf-8");
header("Content-Disposition: attachment; filename=$file_name.$file_ending");
header("Pragma: no-cache");
header("Expires: 0");
第二次嘗試:
header("Content-Type: application/$file_type;charset=windows-1253");
header("Content-Disposition: attachment; filename=$file_name.$file_ending");
header("Pragma: no-cache");
header("Expires: 0");
創建的文件althought它包含正確的希臘字母(用文本編輯器查看)當我打開它在ms-excel希臘字符顯示爲sympol。
我也嘗試過一個庫,它創建xls(打開xls二進制格式),結果相同。這個庫有選項來設置代碼頁和字符集,但什麼都沒有。
什麼想法?
謝謝。
感謝@periklis,我已經使用了不同的庫並開始工作。我總是使用utf-8 – reven