我已经尝试 excel 使用 PHP 以 xls 格式导出。但它不支持缅甸语

I have tried to excel export with the format of xls using PHP. but it didn't support Burmese language

请查找示例代码

header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Length: " . strlen(content));
header("Content-type: application/vnd.ms-excel");
header("Content-type: application/octet-stream, charset=UTF-8; encoding=UTF-8");
header("Content-Disposition: attachment; filename=".$filename.".xls");
echo $xls_output;
exit;``

谢谢,

我认为如果在流的开头发现 bom,excel 会将您的流视为 utf-8。尝试在 headers 之后使用 UTF-8 BOM 启动输出流,如下所示:

echo pack("CCC",0xef,0xbb,0xbf);
echo $xls_output;

希望对您有所帮助!

您需要将 编码更改为 Unicode,也许 字符集更改为 UTF-16:

以下 link 将指导您根据语言进行适当的设置: http://www.unicode.org/faq/myanmar.html

您的计算机上还必须安装该字体。