双引号字符在 unix sun solaris 上为 Octal \223 和 \224,但在 windows 上与 " html entity 相同的字符。为什么?

Double quote characters as Octal \223 and \224 on unix sun solaris but the same characters as " html entity on windows. Why?

在 windows 上,我可以在文件中看到 " 实体,但是当我通过 vi 编辑器打开同一个文件时,我得到 34 八进制数。如何在 unix 中获取 html 实体 "

" 是一个 ASCII 双引号。某些程序(尤其是 Windows 上的浏览​​器)可能会显示与给定字符不同的字符,从而改善您的体验。

示例 34 使用的是 cp1252,出于 HTML 标准化的目的,它已被(误)等同于 ISO-8859-1:

  • Anything wrong with using windows-1252 instead of UTF-8
  • Single quotes showing as diamond shaped question mark in browsers (no database or PHP)

它们的实际 Unicode 值是 U+201CU+201D,或者分别作为 HTMl 个实体 “”

当然,您始终可以在网页中使用 "。但使用 3 等,可能无法按预期工作。