html - Azure静态网站以奇怪的方式编码撇号和其他字符

标签 html azure encoding azure-static-website-hosting

以下是当我在 Chrome 中本地加载 HTML 时此文本的外观:

enter image description here

相反,这是我发布到 Azure 静态网站后呈现的样子:

enter image description here

撇号、引号和其他字符被渲染为一些奇怪的文本。

这是什么原因呢?为什么只有在发布时才会出现这种情况?对我来说似乎是一个 Azure 错误。

最佳答案

检查头部是否有此行

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

关于html - Azure静态网站以奇怪的方式编码撇号和其他字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63801845/

相关文章:

html - 如何仅在移动设备上设置选择框的样式

asp.net - Server.MapPath 在 Azure 上找不到路径

azure - <租户名称>.b2clogin.com 重定向到 login.microsoftonline.com

javascript - Java语言中的音轨循环没有延迟

html - 如何将两个 <divs> 始终并排放置

Azure ExpressRoute 私有(private)对等互连 : 2 BGP Sessions or 1 on a single VC?

swift - 在 Swift 中获取字符串中子字符串位置的可靠函数

Java - 将字符串转换为有效的 URI 对象

Javascript Ascii 编码

java - 如何将 gae Key 字符串转换为 html id 属性字符串?