为什么Gmail不使用quoted-printable编码? [英] Why isn't Gmail using quoted-printable encoding?

查看:141
本文介绍了为什么Gmail不使用quoted-printable编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Gmail的网络版本无需使用 = 来标记邮件内容,这使得邮件处理非常困难:

b
$ b

查看gmail发送的原始邮件内容: b
$ b


这封邮件由Mac OS X Mail发送:





已编辑:



正如。

解决方案

所以,这里有两个独立的问题,GMail正在做其中的一个方式,其中一个错误的方式。

首先是编码问题。你是对的;默认情况下,GMail默认使用UTF-8字符集作为纯文本邮件,而Mac OS X Mail使用Quoted Printable,这是MIME内容传输编码。

第二部分问题是换行。 RFC 2822规定,行数不应超过78个字符(不包括CR + LF),Google通过(相当积极地)引入硬字包装(在较小的屏幕上显示时看起来很丑)等方式解决此问题。大多数其他邮件客户端使用所引用的功能可打印以引入软换行符以符合该建议,这允许邮件客户端分辨硬(即,用户意图的)和软(即由客户端引入的)换行符之间的差异。 p>

GMail没有理由不能使用这个Quoted Printable约定而不是UTF-8,或者使用Format = Flowed(RFC 2646,FAQ)来获得相同的结果。已经有一段时间了,而且我认为GMail强制纯文本用户换行有点愚蠢。



这是一个很好的入门知识。 此处




Why the web-version of Gmail line-wrap its mail content without marking the breaking place with a =, which make email processing very difficult:

See the original mail content sent by gmail:

and this mail sent by Mac OS X Mail:

Edited:

As Brandon Invergo said, they are using different encoding method. I am sorry that I said GMail is not decent.

Edited 2:

Their original content are:

They are wrapped in Gmail, I guess it is according to word-wrap algorithm.

解决方案

So, there are two separate issues here, and GMail is doing one of them "a different way" and one of them "the wrong way."

First is the issue of encoding. You're correct; GMail is using the UTF-8 character set for plain text mails by default, while Mac OS X Mail is using Quoted Printable, which is MIME content transfer encoding.

The second issue is word wrapping. RFC 2822 specifies that lines should be 78 characters or fewer (not including the CR+LF. Google solves this problem by (rather aggressively) introducing hard word wrapping, which looks ugly when displayed on smaller screens, etc. Most other mail clients use the features of quoted printable to introduce soft line breaks to comply with this recommendation. That allows mail clients to tell the difference between a "hard" (ie user-intended) and "soft" (ie introduced by the client) line break.

There is no reason GMail couldn't use this Quoted Printable convention instead of UTF-8, or use Format=Flowed (RFC 2646, FAQ) to achieve the same results. These have both been around a while, and it's a little silly that GMail is forcing word wrap on plain-text users, in my opinion.

A good primer on this whole situation is here.

这篇关于为什么Gmail不使用quoted-printable编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆