3

RFC 2045 では、quoted-printable (QP) の行は 76 文字を超えてはならないことが明確に規定されていますが、実際には、すべてのクライアントがこの要件に従っているとは限りません。それとも、RFC の要件を誤解している可能性がありますか?

実際のメール メッセージから次の数行を考えてみましょう。

<style type=3D"text/css">=0Abody,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }=0A</style>=0A<body style=3D"background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sa=
ns-serif; font-size:12px; margin:0; padding:0;">=0D=0A<div style=3D"background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">=0D=0A<table cellspacin=
g=3D"0" cellpadding=3D"0" border=3D"0" width=3D"100%">=0D=0A<tr>=0D=0A    <td align=3D"center" valign=3D"top" style=3D"padding:20px 0 20px 0">=0D=0A        <!-- [ header starts here] -->=0D=0A       =

各行は 201 文字と CRLF です。=0Aただし、 LF に変換されるシーケンスがいくつかあります。つまり、このメッセージを解析できる必要があるということですか、それとも拒否できますか?

RFC の次のステートメントに違反しているように思えますが、100% 確実ではありません。

(5)   (Soft Line Breaks) The Quoted-Printable encoding
      REQUIRES that encoded lines be no more than 76
      characters long.  If longer lines are to be encoded
      with the Quoted-Printable encoding, "soft" line breaks
      must be used.  An equal sign as the last character on a
      encoded line indicates such a non-significant ("soft")
      line break in the encoded text.
4

1 に答える 1

3

最長の行には 128 個の記号が含まれていますが、このメッセージを解析できるはずです。

このメッセージには=0A=SPACEシーケンスがあります。
=0Aは意味のある改行=SPACEで、ソフトな改行です。
厳密な改行は CRLF ( =0D=0A) である必要がありますが、リンクされた RFC 2045 では
LF のみも許可されています (CR なし):

(4)   (Line Breaks) A line break in a text body, represented
      as a CRLF sequence in the text canonical form, must be
      represented by a (RFC 822) line break, which is also a
      CRLF sequence, in the Quoted-Printable encoding.  (...)

      Note that many implementations may elect to encode the
      local representation of various content types directly
      rather than converting to canonical form first,
      encoding, and then converting back to local
      representation.  In particular, this may apply to plain
      text material on systems that use newline conventions
      other than a CRLF terminator sequence.  Such an
      implementation optimization is permissible, but only
      when the combined canonicalization-encoding step is
      equivalent to performing the three steps separately.
于 2014-09-27T19:12:48.100 に答える