RS-232C 和电子邮件采用 7 位字符集

发布于 2024-08-16 09:19:19 字数 309 浏览 8 评论 0原文

《Designing Embedded Hardware》一书的“9.3. Old Faithful: RS-232C”一章提到,由于RS-232C,电子邮件仍然以7位字符集发送:

这也并非闻所未闻 RS-232C 系统仍使用 7 位数据 框架(另一个剩余的 60 年代),而不是更常见的 8 位。事实上,这也是你会这么做的原因之一 仍然看到正在发送的电子邮件 互联网仅限于 7 位字符 设置,以防数据包发生 通过串行连接进行路由 仅支持 7 位 传输。

如何确认观察结果?

The book "Designing Embedded Hardware" in the chapter "9.3. Old Faithful: RS-232C" mentions that emails are still sent in 7bit char set because of RS-232C:

It's also not unheard of to see
RS-232C systems still using 7-bit data
frames (another leftover from the
'60s), rather than the more common
8-bit. In fact, this is one of the reasons why you'll
still see email being sent on the
Internet limited to a 7-bit character
set, just in case the packets happen
to be routed via a serial connection
that supports only 7-bit
transmissions.

How can I confirm the observation?

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

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

发布评论

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

评论(3

不语却知心 2024-08-23 09:19:19

查看规格。 ARPA 互联网短信的原始 rfc822 明确指出:

消息由标头字段组成
以及可选的主体。身体是
只是包含以下行的序列
ASCII 字符。

因为 ASCII 是 7 位,瞧。

但请注意,原始规范中有一大堆附加内容,即所有 MIME 扩展,它们允许 非 ASCII 文本的消息标头扩展

Check out the spec. The original rfc822, for ARPA Internet Text Messages, explicitly states:

A message consists of header fields
and, optionally, a body. The body is
simply a sequence of lines containing
ASCII characters.

Since ASCII is 7-bit, voila.

Note, however, that there are a whole bunch of additions to that original spec, all the MIME extensions, which allow message header extensions for non-ascii text.

你又不是我 2024-08-23 09:19:19

Quoted-printable MIME 编码专门设计用于以 7 位格式编码 8 位数据位字符。这种编码广泛用于对电子邮件进行编码。

另请注意,您引用的文本说“如果数据包碰巧通过串行连接路由”,这是误导性的,特别是如果它们在 IP 数据包的上下文中进行对话。 IP 数据包采用 8 位数据路径,如果不进行额外编码,则无法通过 7 位 RS-232 链路直接发送(这样就不再是 7 位数据路径,而是 8 位)。

The Quoted-printable MIME encoding is specifically designed to encode 8-bit data in 7-bit characters. This encoding is widely used to encode email.

Note also that the text you quoted says "in case the packets happen to be routed via a serial connection" which is misleading, especially if they're talking in a context of IP packets. IP packets assume an 8-bit data path, and cannot be sent directly over a 7-bit RS-232 link without additional encoding (and then it's not a 7-bit data path anymore, it's 8-bit).

不气馁 2024-08-23 09:19:19

当电子邮件首次流行时,限制为 7 位的系统已经很旧了。今天你找到一个的机会几乎为零。

由于某些字符对电子邮件程序具有特殊含义(最明显的是行尾字符),因此限制字符集仍然有意义。

The systems that were restricted to 7 bits were already old when email first became popular. The chances that you will find one today approach zero.

Since certain characters have special meaning to email programs (most notably the end-of-line character), it still makes sense to limit the character set.

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