HTML Tidy 处理后的希伯来字符变成了乱码

发布于 2024-11-26 14:19:56 字数 492 浏览 1 评论 0原文

我正在使用 HTML Tidy Online (http://infohound.net/tidy/) 来整理一些非常旧且混乱的 HTML 文件,其中包含一些希伯来语字符。每当 Tidy 处理页面时,即使在更改设置中的编码方法之后,输出也会将希伯来字符变成乱码。使用不同的设置,我确实设法获得与 Unicode 实体相同的希伯来字符输出。 我用谷歌搜索了可能的解决方案,但没有找到。 我心里有几个想法,但我不确定如何实现它们(如果有的话)(也许有人有更好的解决方案)。

  1. 我想也许我可以(在处理页面之后)扫描页面中的 unicode 实体,并将它们替换为相应的希伯来字符(当然,以系统的方式)。
  2. 也许我可以获取 HTML Tidy 源代码并修改它以适当地输出希伯来字符。问题是我怀疑我是否有足够的知识来开始做这样的事情。

I'm using HTML Tidy Online (http://infohound.net/tidy/) to tidy up some very old and messed up HTML file which contains some Hebrew characters. Whenever the page is processed by Tidy the output turns Hebrew characters into gibberish, even after changing encoding methods in the settings. Using different settings, I do manage to get the same output with the Hebrew characters as unicode entities.
I Googled around for a possible solution but found none.
I had a couple ideas in mind, but I'm not sure exactly how to approach them, if at all (maybe someone has a better solution).

  1. I thought maybe I could (after processing the page) scan the page for unicode entities and replace them with the corresponding Hebrew characters (in a systematic way, of course).
  2. Maybe I could take the HTML Tidy source code and modify it to output Hebrew characters appropriately. The problem with this is that I doubt I am knowledgeable enough to even get started on something like this.

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

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

发布评论

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

评论(2

ヤ经典坏疍 2024-12-03 14:19:56

我有类似的问题。 UTF-8 格式的文档,包含 unicode 字符。 HTML Tidy 将它们转换为 HTML 实体。 HTMLTIDY.CFG 中的这个修复了它:

char-encoding: utf8
input-encoding: utf8
output-encoding: utf8

希望它有帮助。

I had a similar problem. Document in UTF-8, containing unicode characters. HTML Tidy turned them into HTML entities. This in HTMLTIDY.CFG fixed it:

char-encoding: utf8
input-encoding: utf8
output-encoding: utf8

Hope it helps.

红焚 2024-12-03 14:19:56

您使用的网站 http://infohound.net/tidy/ 有一个“Char 编码”子句右下角。您需要选择 utf-8,但首先需要确保页面在测试编辑器中以 UTF-8 编码。例如,在 Notepad++ 中,您可以转到 Encoding >转换为无 BOM 的 UTF-8

The website http://infohound.net/tidy/ that you are using has a "Char encoding" clause at the bottom right. You need to choose utf-8, but first you need to make sure that the page is encoded in UTF-8 in your test editor. In Notepad++ for example, you can go to Encoding > Convert to UTF-8 without BOM.

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