'''Encoding Header Field for Internet Messages''' -Network Working Group -Request for Comments: 1154 - D. Robinson - R. Ullmann - Prime Computer, Inc. - April 1990 *1. Status of the Memo > This RFC proposes an elective experimental Encoding header field to permit the mailing of multi-part, multi-structured messages. この [[RFC]] は多部分・多構造化[[メッセージ]]を[[メイル]]するための選択実験的な [CODE(822)[[[Encoding]]]] [[頭欄]]を提案します。 > The use of Encoding updates RFC 1049 (Content-Type), and is a suggested update to RFCs 1113, 1114, and 1115 (Privacy Enhancement) [4,7,8]. [CODE(822)[[[Encoding]]]] の使用は [[RFC 1049]] ([CODE(822)[[[Content-Type]]]]) を更新すると共に、 [[RFC 1113]], [[RFC 1114]], [[RFC 1115]] (私匿性拡展) の更新を提案するものであります。 > Distribution of this memo is unlimited. このメモの配布は無制限とします。 *2. Introduction > RFC 822 [2] defines an electronic mail message to consist of two parts, the message header and the message body, separated by an apparently blank line. [[RFC 822]] は[[電子メイル]]の[[メッセージ]]を空行で区切った[[メッセージ頭部]]と[[メッセージ本体]]の2つの部分で構成されるものとして定義しています。 > The Encoding header field permits the message body itself to be further broken up into parts, each part also separated from the next by an apparently blank line. [CODE(822)[[[Encoding]]]] 頭欄は[[メッセージ本体]]の部分を更に空行で区切った複数の部分に分けられるようにします。 > Thus, conceptually, a message has a header part, followed by one or more body parts, all separated by blank lines. 従って、[[メッセージ]]は概念的に空行で区切られる頭部分と 1つ以上の[[本体部分]]を持つこととなります。 > Each body part has an encoding type. The default (no Encoding field in the header) is a message body of one part of type "text". 各[[本体部分]]は符号化型を持ちます。 既定値 ([CODE(822)[[[Encoding]]]] 欄が頭にない場合) は [CODE(822)[[[text]]]] 型の部分が1つとなります。 * 3. The Encoding Field > The Encoding field consists of one or more subfields, separated by commas. Each subfield corresponds to a part of the message, in the order of that part's appearance. A subfield consists of a line count, a keyword defining the encoding, and optional information relevant only to the specific encoding. The line count is optional in the last subfield. [CODE(822)[[[Encoding]]]] 欄は[[読点]]で分離した1つ以上の部分欄から成ります。 各部分欄は[[メッセージ]]の各部分と出現順に対応します。 部分欄は行数、符号化を表す[[鍵語]]、省略可能な特定の符号化にだけ関係する情報で構成します。 行数は最後の部分欄では省略可能です。 **3.1. Format of the Encoding Field > The format of the Encoding field is: [CODE(822)[[[Encoding]]]] 欄の書式は次の通りです。 > [ [], ]* [] [] > where: ここで、 > := a decimal integer := a single alphanumeric token starting with an alpha := keyword-dependent options :[VAR[count]]:[[十進整数]] :[VAR[keyword]]:[[英字]]で始まる[[英数字]]の[[字句]]1つ :[VAR[options]]:[VAR[keyword]] に依存する選択肢 **3.2. > The line count is a decimal number specifying the number of text lines in the part. Parts are separated by a blank line, which is not included in the count of either the proceeding or following part. Because a count always begins with a digit and a keywords always begins with an letter, it is always possible to determine if the count is present. (The count is first because it is the only information of interest when skipping over the part.) 行数はその部分に含まれる文章の行の数を十進数で指定します。 部分と部分は空行で分離しますが、この空行は前後どちらの部分の行数にも含めません。 行数は常に数字で始まり、鍵語は常に英字で始まるので、 行数が指定されているかどうかを常に判定可能です。 (部分を1つ読み飛ばすために必要なのは行数だけですから、 行数を最初に置いています。) > The count is not required on the last or only part. 行数は最後の部分や部分が1つだけの時には必須ではありません。 **3.3. > The keyword defines the encoding type. The keyword is a common single word name for the encoding type. The keywords are not case-sensitive. 鍵語は符号化型を指定します。鍵語は符号化型を表す共通の 1語の名前です。鍵語は大文字・小文字を区別しません。 > The list of standard keywords is intended to be the same as the list used for the Content-Type: header described in [6]. This RFC proposes additions to the list. Implementations can then treat "Content-Type" as an alias of "Encoding", which will always have only one body part. 標準の鍵語は [[RFC 1049]] で説明されている [CODE(822)[[[Content-Type]]]] 頭で使うものと同じとすることを考えています。この [[RFC]] はそれへの追加の値も提案しています。実装は [CODE(822)[[[Content-Type]]]] を常に1つだけしか[[本体部分]]を持たない [CODE(822)[[[Encoding]]]] の別名として扱うことができます。 **3.4. > The optional information is used to specify additional keyword-specific information needed for interpreting the contents of the encoded part. It is any sequence of tokens not containing a comma. 省略可能な情報で、鍵語に依存して符号化部分の内容を解釈するのに必要な情報を指定するために使います。 [[読点]]を含まない任意の字句列です。 **3.5. Encoding Version Numbers > In general, version numbers for encodings, when not actually available within the contents of the encoded information, will be handled as options. 通常符号化の版番号は、 符号化された情報の内容に実際に利用できない時に選択肢として扱います。 **3.6. Comments > Comments enclosed in parentheses may, of course, be inserted anywhere in the Encoding field. Mail reading systems may pass the comments to their clients. Comments must not be used by mail reading systems for content interpretation; that is the function of options. 括弧で括られた[[注釈]]は当然 [CODE(822)[[[Encoding]]]] 欄内のどこにでも挿入できます。メイル読取りシステムは[[注釈]]を[[クライアント]]に渡しても構いません。 [[注釈]]をメイル読み取りシステムが内容の解釈のために使用してはなりません。 あくまでもおまけの機能です。 *4. Encodings > This section describes some of the defined encodings used. この章では使用する符号化のいくつかを説明します。 > As with the other keyword-defined parts of the header format standard, extensions in the form of new keywords are expected and welcomed. Several basic principles should be followed in adding encodings: 頭の書式の規格の他の鍵語で定義する部分同様に新しい鍵語の拡張が予期・ 歓迎されます。符号化を追加するときは幾つかの基本的な原則に従うべきです。 > - The keyword should be the most common single word name for the encoding, including acronyms if appropriate. The intent is that different implementors will be likely to choose the same name for the same encoding. 鍵語は符号化の1単語の最も共通な名前を、適当なら略称を含めて使うべきです。 そうすれば異なる実装が同じ符号化に同じ名前を選ぶでしょう。 > - Keywords not be too general: "binary" would have been a bad choice for the "hex" encoding. 鍵語は一般的過ぎないように。 [CODE[binary]] を [Q[hex]] 符号化に使うのはよくないでしょう。 > - The encoding should be as free from unnecessary idiosyncracies as possible, except when conforming to an existing standard, in which case there is nothing that can be done. 符号化はできる限り特異的でないものとするべきです。 ただし既存の規格に適合する場合はどうしようもありません。 > - The encoding should, if possible, use only the 7 bit ASCII printing characters if it is a complete transformation of a source document (e.g., "hex" or "uuencode"). If it is essentially a text format, the full range may be used. If there is an external standard, the character set may already be defined. 符号化は原始文書の完全な変形なら可能な限り7ビット [[ASCII]] 印字[[文字]]だけを使うべきです (例えば [Q[[[hex]]]] や [Q[[[uuencode]]]])。 本質的に文章書式なら自由な範囲を使って構いません。 外部規格なら[[文字集合]]は既に定義されているかもしれません。 > Keywords beginning with "X-" are permanently reserved to implementation-specific use. No standard registered encoding keyword will ever begin with "X-". [CODE(822)[[[X-]]]] で始まる[[鍵語]]は実装規定の用法に恒久的に予約します。 標準登録符号化鍵語が [CODE(822)[[[X-]]]] から始まることはありません。 **4.1. Text > This indicates that the message is in no particular encoded format, but is to be presented to the user as is. これはメッセージが特定の符号化書式を使っておらず、 利用者にそのまま提示されることを示します。 > The full range of the ASCII character set is used. The message is expected to consist of lines of reasonable length (less than 1000 characters). [[ASCII]] [[文字集合]]の範囲を自由に使えます。メッセージは適度な長さ (1000文字未満) の行から成ることが期待されます。 > On some transport services, only the 7 bit subset of ASCII can be used. Where full 8 bit transparency is available, the text is assumed to be ISO 8859-1 [3] (ASCII-8). 転送サービスによっては [[ASCII]] の7ビットの[[部分集合]]だけ使えます。 完全に8ビット透過なところでは文章は [[ISO/IEC 8859]]‐1 ([[ASCII-8]]) と仮定します。 **4.2. Message > This encoding indicates that the body part is itself in the format of an Internet message, with its own header part and body part(s). A "message" body part's message header may be a full internet message header or it may consist only of an Encoding field. この符号化は本体部分自体が頭部分と本体部分(群)を持ったインターネット・メッセージの書式であることを示します。 [CODE(822)[[[message]]]] 本体部分のメッセージ頭部は完全なインターネット・メッセージ頭部でも構いませんし、 [CODE(822)[[[Encoding]]]] 欄だけであっても構いません。 > Using the message encoding on returned mail makes it practical for a mail reading system to implement a reliable resending function, if the mailer generates it when returning contents. It is also useful in a "copy append" MUA operation. 返却メイルにメッセージ符号化を使えば、 メイル読取りシステムが内容を返却するときにメイル器がこれを生成すれば確実に再送信する機能を実装できます。 [Q[複製して追記]]する [[MUA]] の操作でも便利です。 > Message encoding is also used when mapping to X.400 to handle recursively included X.400 P2 messages. メッセージ符号化は [[X.400]] への写像で [[X.400]] P2 [[メッセージ]]を再帰的に含むのを扱う時にも使えます。 **4.3. Hex > The encoding indicates that the body part contains binary data, encoded as 2 hexadecimal digits per byte, highest significant nibble first. この符号化は本体部分がバイナリ・データを 1バイト辺り十六進数字2桁 (最上位[[ニブル]]を最初に) で符号化して含むことを示します。 > Lines consist of an even number of hexadecimal digits. Blank lines are not permitted. The decode process must accept lines with between 2 and 1000 characters, inclusive. 十六進数字偶数個の行から成ります。空行は認められません。 符号化処理は文字数2文字以上1000文字以下 (両端を含みます。) の行を受付けなければなりません。 **4.4. EVFU > EVFU (Electronic Vertical Format Unit) specifies that each line begins with a one-character "channel selector". The original purpose was to select a channel on a paper tape loop controlling the printer. This encoding is sometimes called "FORTRAN" format. It is the default output format of FORTRAN programs on a number of computer systems. The legal characters are '0' to '9', '+', '-', and space. These correspond to the 12 rows (and absence of a punch) on a printer control tape (used when the control unit was electromechanical). The channels that have generally agreed definitions are: 1 advances to the first print line on the next page 0 skip a line, i.e., double-space + over-print the preceeding line - skip 2 lines, i.e., triple-space (space) print on the next line, single-space **4.5. EDI The EDI (Electronic Document Interchange) keyword indicates that the message or part is a business document, formatted according to ANSI X12 or related standards. The first word after the EDI keyword indicates the particular interchange standard. A message containing a note and 2 X12 purchase orders might have an encoding of: Encoding: 17 TEXT, 146 EDI X12, 69 EDI X12 **4.6. X.400 The Encoding header field provides a mechanism for mapping multi-part messages between CCITT X.400 [1] and RFC 822. The X.400 keyword specifies a section that is converted from an X.400 body part type not known to the gateway, or not corresponding to a useful internet encoding. If the message transits another gate, or if the receiving user has the appropriate software, it can be decoded and used. The X.400 keyword is followed by a second token indicating the method used. The simplest form is "X.400 HEX", with the complete X.409 encoding of the body part in hexadecimal. More compact is "X.400 3/4", using the 3-byte to 4-character encoding as specified in RFC 1113, section 4.3.2.4. **4.7. uuencode The uuencode keyword specifies a section consisting of the output of the uuencode program supplied as part of uucp. **4.8. encrypted The encrypted keyword indicates that the section is encrypted with the methods in RFC 1115 [8]. This replaces the possible use of RFC 934 [5] encapsulation. *References [1] International Telegraph and Telephone Consultative Committee, "Data Communication Networks: Message Handling Systems", In CCITT Recommendations X.400 to X.430, VIIIth Plenary Assembly, Malaga- Torremolinos, 1984, Fascicle VIII.7 ("Red Book"). [2] Crocker, D., "Standard for the Format of ARPA Internet Text Messages", RFC 822, University of Delaware, August 1982. [3] International Organization for Standardization, "Information processing - 8-bit single-byte coded graphic character sets - Part 1: Latin alphabet No. 1", ISO 8859-1, ISO, 1987. [4] Linn, J., "Privacy Enhancement for Internet Electronic Mail: Part I -- Message Encipherment and Authentication Procedures", RFC 1113, IAB Privacy Task Force, August 1989. [5] Rose, M., and E. Stefferud, "Proposed Standard for Message Encapsulation", RFC 943, University of Delaware and NMA, January 1985. [6] Sirbu, M., "Content-type Header Field for Internet Messages", RFC 1049, CMU, March 1988. [7] Kent, S., and J. Linn, "Privacy Enhancement for Internet Electronic Mail: Part II -- Certificate-Based Key Management", RFC 1114, IAB Privacy Task Force, August 1989. [8] Linn, J., "Privacy Enhancement for Internet Electronic Mail: Part III -- Algorithms, Modes, and Identifiers", RFC 1115, IAB Privacy Task Force, August 1989. *Security Considerations Security issues are not addressed in this memo. *Authors' Addresses David Robinson 10-30 Prime Computer, Inc. 500 Old Connecticut Path Framingham, MA 01701 Phone: +1 508 879 2960 x1774 Email: DRB@Relay.Prime.COM Robert Ullmann 10-30 Prime Computer, Inc. 500 Old Connecticut Path Framingham, MA 01701 Phone: +1 508 879 2960 x1736 Email: Ariel@Relay.Prime.COM * メモ [1] [CSECTION[このメモの位置付け]]では >The use of Encoding updates RFC 1049 (Content-Type), and is a suggested update to RFCs 1113, 1114, and 1115 (Privacy Enhancement) [4,7,8]. などと訳の分からないことをいっているが、 この当時の [[IETF]] の標準化過程ではこういうのもありだったのだろうか? ちなみに [[rfc-index.txt]] にはこれらの [[RFC]] が更新されているとか廃止されているとかいう情報はない。 (あくまで [[RFC 1154]] が[[実験的]]だからか?) [2] > The list of standard keywords is intended to be the same as the list used for the Content-Type: header described in [6]. This RFC proposes additions to the list. Implementations can then treat "Content-Type" as an alias of "Encoding", which will always have only one body part. (3.3 ) そもそも定義がこんないい加減なんで気が引けるのだが、 > [ [], ]* [] [] > where: > := a decimal integer := a single alphanumeric token starting with an alpha := keyword-dependent options [[RFC 1049]] における [CODE(822)[[[Content-Type]]:]] 欄の定義では、 [CODE[[VAR[]]]] に沿うとする部分は [CODE(char)[;]] 区切りの複数のオプションだったはずだ。 まあそれは [[RFC 1154]] では違うのだとする [WEAK[([[RFC 1049]] の [CODE(822)[[[Content-Type]]]] と''構文が''同じとは別に言ってないからね)]]。 ところが、 [[RFC 1049]] の最後のオプションは [CODE(char)[,]] 区切りのリストだ! となると判断は微妙に面倒になる。 [WEAK[(この構文的に見分けるのは不可能ではないから、そう問題でないといえば問題でない。)]] [3] [[RFC 1154]] は [[RFC 1505]] で廃止されている。 ただし [[RFC 1505]] の新しい [CODE(822)[[[Encoding]]:]] 欄の構文とは互換性がないし、定義されている内容もかなり違う。