【发布时间】:2011-10-26 12:34:19
【问题描述】:
我使用以下标头来动态创建包含希腊字符的 xls 文件。
第一次尝试:
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");
创建的文件虽然包含正确的希腊字符(使用文本编辑器查看),但当我在 ms-excel 中打开它时,希腊字符显示为符号。
我还尝试了创建具有相同结果的 xls(开放 xls 二进制格式)的库。这个库有设置代码页和字符集的选项,但仍然没有。
有什么想法吗?
谢谢。
【问题讨论】:
标签: php html excel character-encoding