导出 (HTML) 到 Excel 不能正确显示变音符号

Export (HTML) to Excel doesn't display umlaut correctly

使用 Coldfusion,当我将 HTML 导出为 .XLS 文件时,包含变音符号的字符(例如 (ü,ö,ä))无法正确显示。例如,它们显示为 üâ 而不是变音符号。

我尝试了这些解决方案,但没有任何改变。

<cfcontent type="application/vnd.ms-excel;charset=windows-1252" reset="yes">
<cfcontent type="application/vnd.ms-excel;charset_ISO-8859-1 "/>
<cfcontent type="application/vnd.ms-excel;charset_utf-8"/>
<cfheader name="Content-Disposition" value="attachment; filename=dt_memadr_xls.xls" charset="iso-8859-1">

这是答案。我在标题中添加了这个标签。

<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />