1.其实就是html<head>没有加<meta charset="utf-8">
2.其他配置的话,iis>.net全球化>文件utf-8
3.iis的localhost文件夹里的web.config,修改为:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension, LongDate" />
<staticContent>
<remove fileExtension=".txt" />
<mimeMap fileExtension=".txt" mimeType="text/plain;charset=utf-8" />
</staticContent>
</system.webServer>
</configuration>
4.vscode右下角 utf-8
5.点击 vscode右下角 utf-8,选择通过编码保存
其实试了就第一条有效