带问号的钻石

发布于 2024-08-31 17:01:40 字数 309 浏览 4 评论 0原文

当我呈现数据库中的数据时,我在 HTML 属性中看到这些带有问号的小菱形。我正在使用 EPiServer 和一些自定义属性。

这是我收集的信息,

  • 我将数据保存为 XML 文档,因为我使用需要多个定义值的自定义 EPiServer 属性。它保存为 UTF8。

  • 只有元素标签中的属性有这个问题,比如align=left变成了align=�left�。那里没有“字符,但我还是得到了菱形。

  • 如果我在元素外部使用 ",它会正确工作并显示。

有什么线索吗?

I'm getting these little diamonds with question marks in them in my HTML attributes when I present data from my database. I'm using EPiServer and a few custom properties.

This is the information I've gathered,

  • I save my data as a XML document, since I use custom EPiServer properties which need more than one defined value. This is saved as UTF8.

  • It's only attributes in element tags which have this problem, such as align=left becomes align=�left�. There is no " character there, but I get the diamonds anyway.

  • If I use " outside an element, it works and shows correctly.

Any clues?

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

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

发布评论

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

评论(2

入怼 2024-09-07 17:01:40

这是您的字符编码方案的问题。

我建议阅读这篇文章,其中(靠近底部),他向您展示为什么您会得到带有问号的小钻石。

This is a problem with your character encoding scheme.

I would recommend reading this article, where (close to the bottom of it), he shows you why you get that little diamond with question marks.

泛滥成性 2024-09-07 17:01:40

任何 Microsoft Office 套件产品是否接触过 XML。

这些是将普通引号 (") x'22' 转换为智能引号 x'93' 和 x'94'(“”) 的臭名昭著。

单引号 (') 通常从 x'27' 转换为 x'91' 和 x “92”对 ('')。

Has the XML been touched by any of the Microsoft Office suite products.

These are notorius for switching vanilla quotes (") x'22' to smartquotes x'93' and x'94'(“”).

Also singlequote (') is often converted from x'27' to x'91' and x'92' pairs (‘’).

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