简体   繁体   English

RS-232C和电子邮件(7位字符集)

[英]RS-232C and Email in 7bit char set

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: “ 9.3。忠实的老派:RS-232C”一章中的“设计嵌入式硬件”一书中提到,由于RS-232C,电子邮件仍以7位字符集发送:

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. 听说RS-232C系统仍在使用7位数据帧(60年代的另一个遗留物),而不是更常见的8位数据,这也是闻所未闻的。 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. 实际上,这就是为什么您仍然会看到互联网上的电子邮件限制为7位字符集的原因之一,以防万一数据包碰巧通过仅支持7位传输的串行连接进行路由。

How can I confirm the observation? 如何确认观察结果?

Check out the spec. 查看规格。 The original rfc822 , for ARPA Internet Text Messages, explicitly states: 用于ARPA Internet文本消息的原始rfc822明确指出:

A message consists of header fields and, optionally, a body. 消息由标题字段和(可选)正文组成。 The body is simply a sequence of lines containing ASCII characters. 主体只是一系列包含ASCII字符的行。

Since ASCII is 7-bit, voila. 由于ASCII是7位,所以瞧。

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. 但是请注意,该原始规范还有很多附加功能,包括所有MIME扩展名,这些扩展名允许非ascii文本的消息头扩展名

The Quoted-printable MIME encoding is specifically designed to encode 8-bit data in 7-bit characters. 引号的可打印 MIME编码是专门设计用来以7位字符编码8位数据的。 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数据包的上下文中交谈时。 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). IP数据包采用8位数据路径,如果没有其他编码,则无法直接通过7位RS-232链路发送(因此,它不再是7位数据路径,而是8位)。

The systems that were restricted to 7 bits were already old when email first became popular. 当电子邮件首次流行时,限制为7位的系统已经很旧了。 The chances that you will find one today approach zero. 您今天发现1的机会接近零。

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. 由于某些字符对电子邮件程序具有特殊含义(最著名的是行尾字符),因此限制字符集仍然有意义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM