为什么 Gmail 不使用带引号的可打印编码? [英] Why isn't Gmail using quoted-printable encoding?

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

问题描述

为什么网页版的 Gmail 会在不使用 = 标记中断位置的情况下对其邮件内容进行换行,这使得电子邮件处理变得非常困难:

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

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

正如 .

解决方案

所以,这里有两个不同的问题,GMail 正在以不同的方式"解决其中一个问题.其中之一是错误的方式".

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

第二个问题是自动换行.RFC 2822 规定行数应为 78 个字符或更少(不包括 CR+LF.Google 通过(相当积极地)引入硬自动换行来解决这个问题,这种换行在较小的屏幕上显示时看起来很难看,等等.大多数其他邮件客户端使用引用 printable 的功能以引入软换行符以符合此建议.这允许邮件客户端区分硬"(即用户预期的)和软"(即由客户端引入)换行符之间的区别.

GMail 没有理由不能使用这种带引号的可打印约定来代替 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 不使用带引号的可打印编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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