javascript - 从 html 文本中获取数字,但它们显示为正方形

标签 javascript html css

我已经下载了一个 PDF 并使用 pdf2htmlEX 将其转换为 html 文件。

现在 HTML 文件显示在 iframe 中,它正确显示所有数字,但是当我尝试使用 jquery text() 或类似的方法获取纯文本时,它只是将  作为 js 中的字符串获取 还有浏览器(safari 和 chrome ) 控制台显示  。

所以我尝试获取原始 HTML 文件,该文件在 vs code 或 sublime 中也显示 。

然后我在想问题是编码后的代码使 html 可读为纯文本,所以我在终端上尝试了 nano,它也显示了 。

这是我得到的显示

<span class="fc0"></span>

但是浏览器好像显示没有问题

<span class="fc0"></span>

作为“23”

如果我尝试 css span display:none 数字消失,所以它们必须在那里并且浏览器可以读取并显示它们

代码在图片里

非常感谢。

本尼

enter image description here

enter image description here enter image description here enter image description here

最佳答案

您使用的字体系列将正常拉丁语范围之外的字符映射为看起来像拉丁语数字。

关于javascript - 从 html 文本中获取数字,但它们显示为正方形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59057618/

相关文章:

javascript - 如何在 Three.JS 中加载当前鼠标位置的 3D 模型(JSON)?

javascript - 向下滚动到 Javascript 进度条后加载它

html - 通过 Bootstrap CSS 自定义 CSS

ios - iPhone 6 上的 CSS - 为什么 DIV 不对齐?

JavaScript 雷霆群从 CDN 加载外部库

javascript - Angular js : an arrray from one file to another

css - 设置 span 元素的百分比宽度

javascript - AngularJS IF 指令使用列

css - 字体会导致性能问题

javascript - 在 div 上制作三 Angular 形