Chr*_*ski 4 email encoding rfc
我正在编写一个规范,该规范在电子邮件消息中基本上需要 ASCII 字符。我记得电子邮件的主题可以用外语编码,但是我不知道这种编码是什么。
我认为主题中的编码不像说 UTF-8 或 UTF-16 那样简单,因为可能存在其他变体。
电子邮件主题行可以使用哪些编码?
不支持 MIME(可选)的电子邮件由 RFC 5322 定义,并且只允许“可打印”的 ASCII 字符。MIME 扩展了该标准并允许某些字段(包括主题)的其他编码方案。
编码标题时,您使用“Encoded-Word”方法:
形式为:“=?charset?encoding?encoded text?="。
Run Code Online (Sandbox Code Playgroud)charset may be any character set registered with IANA. Typically it would be the same charset as the message body. encoding can be either "Q" denoting Q-encoding that is similar to the quoted-printable encoding, or "B" denoting base64 encoding. encoded text is the Q-encoded or base64-encoded text. An encoded-word may not be more than 75 characters long, including charset, encoding, encoded text, and delimiters. If it is desirable to
编码比 75 个字符的编码字多的文本,可以使用多个编码字(由 CRLF 空格分隔)。
归档时间: |
|
查看次数: |
1351 次 |
最近记录: |