HTML 中的奇数字符

发布于 2025-01-06 15:16:44 字数 1253 浏览 1 评论 0原文

中显示奇怪的字符

在某些浏览器中,在 HTML .cs​​html

<h3>Cadastre seu currículo e faça parte da equipe Let’s Go.</h3>

生成的 HTML

Odd character

完整图像

Metas

<meta name="title" content="Let's Go Festas" />
<meta name="url" content="http://letsgofestas.com.br" />
<meta name="description" content="isto é um teste" />
<meta name="keywords" content="teste" />
<meta name="charset" content="ISO-8859-1" />
<meta name="autor" content="Bind Solution" />
<meta name="company" content="Let's Go Festas" />
<meta name="revisit-after" content="10" />

<meta name="viewport" content="width=device-width" />
<meta name="robots" content="index,follow" /> 
<meta name="googlebot" content="all" /> 
<meta name="classification" content="Internet" /> 
<meta name="publisher" content="Bind Solution" /> 
<meta name="copyright" content="Bind Solution" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

**注意:** 例如在 Chrome 中,这种情况不会发生!

In some browsers is showing a strange character in HTML

.cshtml

<h3>Cadastre seu currículo e faça parte da equipe Let’s Go.</h3>

Generated HTML

Odd character

Full image

Metas

<meta name="title" content="Let's Go Festas" />
<meta name="url" content="http://letsgofestas.com.br" />
<meta name="description" content="isto é um teste" />
<meta name="keywords" content="teste" />
<meta name="charset" content="ISO-8859-1" />
<meta name="autor" content="Bind Solution" />
<meta name="company" content="Let's Go Festas" />
<meta name="revisit-after" content="10" />

<meta name="viewport" content="width=device-width" />
<meta name="robots" content="index,follow" /> 
<meta name="googlebot" content="all" /> 
<meta name="classification" content="Internet" /> 
<meta name="publisher" content="Bind Solution" /> 
<meta name="copyright" content="Bind Solution" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

**NOTE: ** In chrome for example , this does not occur!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

飘然心甜 2025-01-13 15:16:44

这些字符是 utf-8 或更可能是杂散字符,但您的字符编码是 iso-8859。您在头部显示两种编码。将其更改为 utf-8 和/或删除这些字符。但我认为那些都是流浪者。

Those characters are utf-8 or more likely strays but your character encoding is iso-8859. You are showing both encodings in the head. Change it to utf-8 and/or remove those characters. I think those are strays, though.

沫雨熙 2025-01-13 15:16:44

我在一个非常特殊的情况下遇到了这个问题:当我将文本从 MS Word 复制/粘贴到 Wordpress 时。我不知道你使用的是什么系统 - 但是,我发现必须修复它:

假设你的句子是“See Jane [WEIRD CHARACTER]Run”。

我确实必须进去并删除句子中间的“e R”,然后手动将其重新输入。我知道这很奇怪。但似乎有一个奇怪的空间角色被困在那里。

I've run into this issue in a very specific circumstance: when I copied/pasted text out of MS Word into Wordpress. I don't know what system you're using - but, what I found had to happen to fix it:

Let's say your sentence is "See Jane [WEIRD CHARACTER]Run."

I literally had to go in and delete "e R" in the middle of the sentence, then manually type that back in. Odd, I know. But there seemed to be an odd space character that just got stuck in there.

云醉月微眠 2025-01-13 15:16:44

通过 validator 运行您的网站,看看它是否捕获任何编码问题,您可能有编码问题,或者您的文档可能存在编码问题保存为 UTF-8 以外的格式(例如 BOM UTF-8)。

Run your site through a validator and see if it catches any enconding issues, you might have enconding issues or your document might be saved as something other than UTF-8 (such as BOM UTF-8).

淡忘如思 2025-01-13 15:16:44

我曾经遇到过类似的问题,发现除了元标记之外,我还必须设置响应标头。我不知道你使用的是什么语言,但是在Java中,它是这样的: response.setCharacterEncoding("UTF-8");

I had a similar issue once and found that in addition to the meta tags, I had to set the response header as well. I don't know what language you're using, but in Java, it is something like this: response.setCharacterEncoding("UTF-8");

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文