【问题标题】:How can we fix character encoding regression when using flattened HTML with no html, head, or body tags?当使用没有 html、head 或 body 标签的扁平化 HTML 时,我们如何修复字符编码回归?
【发布时间】:2022-12-06 01:48:30
【问题描述】:

我们扁平化了我们的 HTML(只发出一个没有 html、head 或 body 标签的 HTML 标签的扁平树节点),现在字符编码被搞砸了。我们如何解决?

如果需要,请在此处获取更多信息:

https://github.com/breck7/scroll/issues/85

【问题讨论】:

标签: html


【解决方案1】:

与所需的字符集一起使用。导入header.scroll文件后,添加meta标签指定UTF-8字符编码。

<!-- Import the Scroll header -->
<import src="header.scroll" />

<!-- Specify the character encoding using the meta tag -->
<meta charset="iso-8859-1">

<!-- Other HTML tags here -->

标题.滚动:

importOnly
description Tools for thought.
github https://github.com/breck7/scroll
viewSourceBaseUrl https://github.com/breck7/scroll/blob/main
twitter https://twitter.com/breckyunits
email feedback@scroll.pub
baseUrl https://scroll.pub/

<!-- Specify the character encoding using the meta tag -->
meta charset="iso-8859-1"

metaTags
scrollCssTag
scrollHeader

【讨论】:

    猜你喜欢
    • 2013-03-29
    • 2011-04-23
    • 1970-01-01
    • 2018-09-25
    • 2011-09-12
    • 2014-11-03
    • 1970-01-01
    • 2016-11-19
    • 1970-01-01
    相关资源
    最近更新 更多