From: morioka Date: Sat, 4 Jul 1998 11:28:15 +0000 (+0000) Subject: New file. X-Git-Tag: flim-1_8_1~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1a36deaa34af2165688dfec337e925575e690506;p=elisp%2Fflim.git New file. --- diff --git a/mime-en.sgml b/mime-en.sgml new file mode 100644 index 0000000..264996e --- /dev/null +++ b/mime-en.sgml @@ -0,0 +1,1265 @@ + + +FLIM 1.8 Manual about MIME Features +<author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail> +<date>1998/07/01 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents MIME features of FLIM, a Internet message +parsing/encoding library for GNU Emacs. +</abstract> + + +<h1> What is FLIM? +<node> Introduction +<p> +FLIM is a library to provide basic features about message +representation or encoding. + + +<h1> How to use MIME features +<node> How to use +<p> +Please eval following to use MIME features provided by FLIM: + +<lisp> +(require 'mime) +</lisp> + + +<h1> Message and Entity +<node> Entity +<p> +According to <dref>RFC 2045</dref>, `The term ``entity'', refers +specifically to the MIME-defined header fields and contents of either +a message or one of the parts in the body of a multipart entity.' In +this document, the term <concept>entity</concept> indicates all of +header fields and body. +<p> +The definition of RFC 2045 indicates that a MIME message is a tree. +An message is a tree, each node is an entity, like following figure. +Namely MIME extends message to tree structure. +<p> +FLIM uses <concept>mime-entity</concept> structure to represent +information of entity. In this document, it is called simply +`mime-entity'. +<p> +前述のように、message 中の各 entity は木の節に当たりますが、この木には +深さと同じ深さの中の順番に従って番号が付けることができます。即ち、 +<verb> + + ┌───┐ + │ nil │ + └─┬─┘ + ┌─────────┼─────────┐ + ┌┴┐ ┌┴┐ ┌┴┐ + │0│ │1│ │2│ + └┬┘ └┬┘ └┬┘ + │ ┌────┼────┐ │ + ┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐ + │ 0.0││ 1.0││ 1.1││ 1.2││ 2.0│ + └───┘└───┘└───┘└───┘└───┘ + +</verb> +<p> +<noindent>のように深さ n の節には長さ n の整数列の節番号が振れます。これ +を <concept>entity-number</concept> と呼びます。entity-number は S 式と +しては <code>(1 2 3)</code> のような整数のリストとして表現されます。 +<p> +mime-entity では、これと同様の <concept>node-id</concept> を用います。 +node-id はちょうど entity-number を逆にしたリストで、entity-number +1.2.3 に対応する node-id は <code>(3 2 1)</code> です。 +<p> +前述のように、MIME message は entity を単位とした木構造になっているので、 +この根である message 全体も mime-entity で表現することができ、buffer +local 変数 <code>mime-message-structure</code> に格納することにします。 +そして、entity-number や node-id を用いることで +<code>mime-message-structure</code> における entity の相対的な位置関係を +扱うことができます。 + + +<h2> Functions to create mime-entity +<node> Entity creation +<p> +<defun name="mime-open-entity"> + <opts> type location +<p> +Open an entity and return it. +<p> +<var>type</var> is representation-type. <cf node="mm-backend"> +<p> +<var>location</var> is location of entity. Specification of it is +depended on representation-type. +</defun> + +<defun name="mime-parse-message"> + <opts> default-ctl node-id +<p> +Parse current buffer as message, and return the result as mime-entity. +</defun> + +<defun name="mime-parse-buffer"> + <opts> buffer +<p> +Parse <var>buffer</var> as message, and set the result to buffer local +variable <code>mime-message-structure</code> of <var>buffer</var> as +mime-entity. +<p> +If <var>buffer</var> is omitted, current buffer is used. +</defun> + + +<h2> Features about message tree +<node> Entity hierarchy +<p> +<defvar name="mime-message-structure"> +<p> +Buffer local variable to store mime-entity structure of message. +</defvar> + +<defun name="mime-entity-children"> + <args> entity +<p> +Return list of entities included in the <var>entity</var>. +</defun> + +<defun name="mime-entity-parent"> + <args> entity <opts> message +<p> +Return parent entity of the <var>entity</var>. +<p> +If <var>message</var> is specified, it is regarded as root instead of +<code>mime-message-structure</code>. +</defun> + +<defun name="mime-root-entity-p"> + <args> entity +<p> +Return non-<code>nil</code> if <var>entity</var> is root entity +(message). +</defun> + +<defun name="mime-entity-node-id"> + <args> entity +<p> +Return node-id of <var>entity</var>. +</defun> + +<defun name="mime-entity-number"> + <args> entity +<p> +Return entity-number of <var>entity</var>. +</defun> + +<defun name="mime-find-entity-from-number"> + <args> entity-number <opts> message +<p> +Return entity from <var>entity-number</var> in <var>message</var>. +<p> +If <var>message</var> is not specified, +<code>mime-message-structure</code> is used. +</defun> + +<defun name="mime-find-entity-from-node-id"> + <args> entity-node-id <opts> message +<p> +Return entity from <var>entity-node-id</var> in <var>message</var>. +<p> +If <var>message</var> is not specified, +<code>mime-message-structure</code> is used. +</defun> + + +<h2> Functions about attributes of mime-entity +<node> Entity Attributes +<p> +<defun name="mime-entity-content-type"> + <args> entity +<p> +Return content-type of <var>entity</var>. +<cf node="mime-content-type"> +</defun> + +<defun name="mime-entity-content-disposition"> + <args> entity +<p> +Return content-disposition of <var>entity</var>. <cf +node="mime-content-disposition"> +</defun> + +<defun name="mime-entity-filename"> + <args> entity +<p> +Return file name of <var>entity</var>. +</defun> + +<defun name="mime-entity-encoding"> + <args> entity +<p> +Return content-transfer-encoding of <var>entity</var>. +<cf node="Content-Transfer-Encoding"> +</defun> + +<defun name="mime-entity-cooked-p"> + <args> entity +<p> +Return non-nil if contents of <var>entity</var> has been already +code-converted. +</defun> + + +<h2> Information of entity header +<node> Entity-header +<p> +<defun name="mime-fetch-field"> + <args> field-name <opts> entity +<p> +Return field-body of <var>field-name</var> field in header of +<var>entity</var>. +<p> +The results is network representation. +<p> +If <var>entity</var> is omitted, <code>mime-message-structure</code> +is used as default value. +<p> +If <var>field-name</var> field is not found, this function returns +<code>nil</code>. +</defun> + +<defun name="mime-read-field"> + <args> field-name <opts> entity +<p> +Parse <var>field-name</var> field in header of <var>entity</var>, and +return the result. +<p> +Format of result is depended on kind of field. For non-structured +field, this function returns string. For structured field, it returns +list corresponding with structure of the field. +<p> +Strings in the result will be converted to internal representation of +Emacs. +<p> +If <var>entity</var> is omitted, <code>mime-message-structure</code> +is used as default value. +<p> +If <var>field-name</var> field is not found, this function returns +<code>nil</code>. +</defun> + +<defun name="mime-insert-decoded-header"> + <args> entity <opts> invisible-fields visible-fields +<p> +Insert before point a decoded contents of header of <var>entity</var>. +<p> +<var>invisible-fields</var> is list of regexps to match field-name to +hide. <var>visible-fields</var> is list of regexps to match +field-name to hide. +<p> +If a field-name is matched with some elements of +<var>invisible-fields</var> and matched with none of +<var>visible-fields</var>, this function don't insert the field. +</defun> + + +<h2> Contents of Entity +<node> Entity-content +<p> +<defun name="mime-entity-content"> + <args> entity +<p> +Return content of <var>entity</var> as byte sequence. +</defun> + +<defun name="mime-write-entity-content"> + <args> entity filename +<p> +Write content of <var>entity</var> into <var>filename</var>. +</defun> + +<defun name="mime-write-entity"> + <args> entity filename +<p> +Write representation of <var>entity</var> into <var>filename</var>. +</defun> + +<defun name="mime-write-entity-body"> + <args> entity filename +<p> +Write body of <var>entity</var> into <var>filename</var>. +</defun> + + +<h2> Entity as buffer representation +<node> Entity buffer +<p> +<defun name="mime-entity-buffer"> + <args> entity +<p> +Return buffer, which contains <var>entity</var>. +</defun> + +<defun name="mime-entity-point-min"> + <args> entity +<p> +Return the start point of <var>entity</var> in the buffer which +contains <var>entity</var>. +</defun> + +<defun name="mime-entity-point-max"> + <args> entity +<p> +Return the end point of <var>entity</var> in the buffer which +contains <var>entity</var>. +</defun> + +<defun name="mime-entity-header-start"> + <args> entity +<p> +Return the start point of header of <var>entity</var> in the buffer +which contains <var>entity</var>. +</defun> + +<defun name="mime-entity-header-end"> + <args> entity +<p> +Return the end point of header of <var>entity</var> in the buffer +which contains <var>entity</var>. +</defun> + +<defun name="mime-entity-body-start"> + <args> entity +<p> +Return the start point of body of <var>entity</var> in the buffer +which contains <var>entity</var>. +</defun> + +<defun name="mime-entity-body-end"> + <args> entity +<p> +Return the end point of body of <var>entity</var> in the buffer which +contains <var>entity</var>. +</defun> + + +<h2> Entity representations and implementations +<node> mm-backend +<p> +Entity は抽象化されたデータ表現で、実際のデータ表現としては用途に応じて +さまざまなものが利用できるように設計されています。 +<p> +ここで、entity がどういう種類の表現を行っているかを示すのが +<concept>representation-type</concept> で、entity を生成する時にはこれを +指定します。<cf node="Entity Creation"> +<p> +前節までに述べて来た entity に対する処理は、entity に対してその処理を依 +頼することによって実現されています。Entity は自分の +representation-type を知っており、その representation-type に応じて実際 +の処理を行う関数を呼び出します。このような関数を <concept>entity 処理 +method</concept> と呼びます。また、representation-type 毎にこのような関 +数をまとめたものを <concept>mm-backend</concept> と呼びます。 +<p> +mm-backend は representation-type の名前の先頭に <code>mm</code> という +接頭辞を付けた関数名からなる module で、その module 名は同様に +representation-type の名前の先頭に <code>mm</code> を付けたものになって +います。この module は representation-type の entity が最初に生成される +時に自動的に require されます。 + + +<h3> Message-passing for entity +<node> Request for entity +<p> +<defun name="mime-entity-send"> + <args> entity message <rest> args +<p> +<var>entity</var> に <var>message</var> を送る。 +<p> +<var>args</var> は <var>message</var> の引数である。 +</defun> + + +<h3> How to make mm-backend +<node> mm-backend module +<p> +(すみません。そのうち書きます (^_^;) +<p> +(とりあえず、mm*.el を参考にしてください) + + +<h1> Information of Content-Type field +<node> Content-Type +<p> +<concept>Content-Type field</concept> is a field to indicate kind of +contents or data format, such as <dref>media-type</dref> and MIME +charset. It is defined in <dref>RFC 2045</dref>. + +<memo> +<p> +Historically, Content-Type field was proposed in RFC 1049. In it, +Content-Type did not distinguish type and subtype, and there are no +mechanism to represent kind of character code like MIME charset. +</memo> + +<p> +FLIM は Content-Type 欄を構文解析する関数と Content-Type 欄の解析結果を +格納する構造体 <concept>mime-content-type</concept> を提供します。 + + +<h2> Format of Content-Type field +<node> Content-Type field +<p> +Content-Type 欄の形式は以下のように定義されています: + +<quote> +``Content-Type'' ``:'' <concept>type</concept> ``/'' +<concept>subtype</concept> *( ``;'' <concept>parameter</concept> ) +</quote> +<p> +例えば、 + +<quote> +<verb> +Content-Type: image/jpeg +</verb> +</quote> + +<noindent> +や + +<quote> +<verb> +Content-Type: text/plain; charset=iso-2022-jp +</verb> +</quote> + +<noindent> +などのように用いられます。 +<p> +ここで、`type' と `subtype' は entity の形式を示すもので、両者を総称し +て、`media-type' と呼ぶことにします。上記の例における `image/jpeg' や +`text/plain' は media-type の1つです。 + +<memo> +<p> +Content-Type 欄のない entity は + +<quote> +<verb> +Content-Type: text/plain; charset=us-ascii +</verb> +</quote> + +<noindent> +として解釈される。<cf node="us-ascii"> +</memo> + + +<h2> mime-content-type structure +<node> mime-content-type +<p> +<define type="Structure" name="mime-content-type"> +<p> +Content-Type 欄の情報を格納するための構造体。 +<p> +この構造体を参照するには <code>mime-content-type-要素名</code> という名 +前の参照関数を用いる。 +<p> +この構造体の要素は以下の通りである: + +<vl> +<dt>primary-type<dd>media-type の主型 (symbol). +</dd> +<dt>subtype<dd>media-type の副型 (symbol). +</dd> +<dt>parameters<dd>Content-Type 欄の parameter (連想 list). +</dd> +</vl> +</define> + +<defun name="make-mime-content-type"> + <args> type subtype + <opts> parameters +<p>content-type の生成子。 +</defun> + +<defun name="mime-content-type-parameter"> +<args> content-type parameter +<p> +<var>content-type</var> の <var>parameter</var> の値を返す。 +</defun> + + +<h2> Content-Type 欄の解析器 +<node> Content-Type parser +<p> +<defun name="mime-parse-Content-Type"> + <args> string +<p> +<var>string</var> を content-type として解析した結果を返す。 +</defun> + +<defun name="mime-read-Content-Type"> +<p> +現在の buffer の Content-Type 欄を読み取り、解析した結果を返す。 +<p> +Content-Type 欄が存在しない場合は nil を返す。 +</defun> + + +<h2> Content-Type に関する有用な関数 +<node> Content-Type utility +<p> +<defun name="mime-type/subtype-string"> + <args> type <opts> subtype +<p> +<var>type</var> と <var>subtype</var> から type/subtype 形式の文字列を返 +す。 +</defun> + + +<h1> Content-Disposition 欄の情報 +<node> Content-Disposition +<p> +<concept>Content-Disposition 欄</concept> は entity の表示や file 名など +の属性になどに関する情報を記述するためのものです。 + +<rfc number="2183" type="Standards Track" + author="S. Dorner, K. Moore and R. Troost" + title="Communicating Presentation Information in + Internet Messages: The Content-Disposition Header" + date="August 1997"> +<p> +FLIM は Content-Disposition 欄を構文解析する関数と Content-Disposition +欄の解析結果を格納する構造体 +<concept>mime-content-disposition</concept> を提供します。 + + +<h2> mime-content-disposition 構造体 +<node> mime-content-disposition +<p> +<define type="Structure" name="mime-content-disposition"> +<p> +Content-Disposition 欄の解析結果を収めるための構造体。 +<p> +この構造体を参照するには <code>mime-content-disposition-要素名</code> と +いう名前の参照関数を用いる。 +<p> +この構造体の要素は以下の通りである: + +<vl> +<dt>disposition-type<dd>disposition-type (symbol). +</dd> +<dt>parameters<dd>Content-Disposition 欄の parameter (連想 list). +</dd> +</vl> +</define> + +<defun name="mime-content-disposition-parameter"> +<args> content-disposition parameter +<p> +<var>content-disposition</var> の <var>parameter</var> の値を返す。 +</defun> + +<defun name="mime-content-disposition-filename"> +<args> content-disposition +<p> +<var>content-disposition</var> の filename の値を返す。 +</defun> + + +<h2> Content-Disposition 欄の解析器 +<node> Content-Disposition parser +<p> +<defun name="mime-parse-Content-Disposition"> + <args> string +<p> +<var>string</var> を content-disposition として解析した結果を返す。 +</defun> + +<defun name="mime-read-Content-Disposition"> +<p> +現在の buffer の Content-Disposition 欄を読み取り、解析した結果を返す。 +<p> +Content-Disposition 欄が存在しない場合は nil を返す。 +</defun> + + +<h1> 符号化法 +<node> Content-Transfer-Encoding +<p> +<concept>Content-Transfer-Encoding 欄</concept> は entity の符号化法を記 +述するためのものです。 +<p> +FLIM では Content-Transfer-Encoding 欄を構文解析する関数を提供します。こ +れらの関数は Content-Transfer-Encoding 欄の情報は文字列で表現します。 +<p> +また、Content-Transfer-Encoding に基づいて符号化・復号化を行う関数も提 +供されます。 + + +<h2> Content-Transfer-Encoding 欄の解析器 +<node> Content-Transfer-Encoding parser +<p> +<defun name="mime-parse-Content-Transfer-Encoding"> + <args> string +<p> +<var>string</var> を content-transfer-encoding として解析した結果を返す。 +</defun> + +<defun name="mime-read-Content-Transfer-Encoding"> + <opts>default-encoding +<p> +現在の buffer の Content-Transfer-Encoding 欄を読み取り、解析した結果を +返す。 +<p> +Content-Transfer-Encoding 欄が存在しない場合は +<var>default-encoding</var> を返す。 +</defun> + + +<h2> 領域の符号化・復号化 +<node> Region encoder/decoder +<p> +<defun name="mime-encode-region"> + <args> start end encoding +<p> +Encode region <var>start</var> to <var>end</var> of current buffer +using <var>encoding</var>. +</defun> + +<defun name="mime-decode-region"> + <args> start end encoding +<p> +Decode region <var>start</var> to <var>end</var> of current buffer +using <var>encoding</var>. +</defun> + +<defvar name="mime-encoding-method-alist"> +<p> +Alist of encoding vs. corresponding method to encode region. +<p> +Each element looks like <code>(STRING . FUNCTION)</code> or +<code>(STRING . nil)</code>. <var>string</var> is +content-transfer-encoding. <code>function</code> is region encoder +and <code>nil</code> means not to encode. +</defvar> + +<defvar name="mime-decoding-method-alist"> +<p> +Alist of encoding vs. corresponding method to decode region. +<p> +Each element looks like <code>(STRING . FUNCTION)</code> or +<code>(STRING . nil)</code>. <var>string</var> is +content-transfer-encoding. <code>function</code> is region decoder +and <code>nil</code> means not to decode. +</defvar> + + +<h2> 文字列の符号化・復号化 +<node> String encoder/decoder +<p> +<defun name="mime-decode-string"> + <args> string encoding +<p> +<var>string</var> を <var>encoding</var> として復号した結果を返します。 +</defun> + +<defvar name="mime-string-decoding-method-alist"> +<p> +Alist of encoding vs. corresponding method to decode string. +<p> +Each element looks like <code>(STRING . FUNCTION)</code>. +STRING is content-transfer-encoding. +FUNCTION is string decoder. +</defvar> + + +<h2> File の符号化・復号化 +<node> File encoder/decoder +<p> +<defun name="mime-insert-encoded-file"> + <args> filename encoding +<p> +Insert file <var>FILENAME</var> encoded by <var>ENCODING</var> format. +</defun> + +<defun name="mime-write-decoded-region"> + <args> start end filename encoding +<p> +Decode and write current region encoded by <var>encoding</var> into +<var>filename</var>. +<p> +<var>start</var> and <var>end</var> are buffer positions. +</defun> + +<defvar name="mime-file-encoding-method-alist"> +<p> +Alist of encoding vs. corresponding method to insert encoded file. +<p> +Each element looks like <code>(STRING . FUNCTION)</code>. STRING is +content-transfer-encoding. FUNCTION is function to insert encoded +file. +</defvar> + +<defvar name="mime-file-decoding-method-alist"> +<p> +Alist of encoding vs. corresponding method to write decoded region to +file. +<p> +Each element looks like <code>(STRING . FUNCTION)</code>. STRING is +content-transfer-encoding. FUNCTION is function to write decoded +region to file. +</defvar> + + +<h1> Header の network 表現 +<node> encoded-word +<p> +encoded-word は header で非 <dref>ASCII</dref> 文字を表現するための形 +式で、<concept>RFC 2047</concept> で定義されています。 +<p> +<rfc number="2047" type="Standards Track" author="K. Moore" + title="MIME (Multipurpose Internet Mail Extensions) Part + Three: Message Header Extensions for Non-ASCII Text" + date="November 1996" obsolete="1521,1522,1590"> +<p> +また、行儀の悪いことだと言えますが、encoded-word を用いずに非 +<dref>ASCII</dref> 文字を header に入れた記事も存在します。 +<p> +FLIM はこれらを符号化・復号化する機能を提供します。 + + +<h2> Header の符号化・復号化 +<node> Header encoder/decoder +<p> +<defun name="eword-encode-header"> + <opts> code-conversion separator +<p> +Decode MIME encoded-words in header fields. +<p> +If <var>code-conversion</var> is <code>nil</code>, it decodes only +encoded-words. If it is mime-charset, it decodes non-ASCII bit +patterns as the mime-charset. Otherwise it decodes non-ASCII bit +patterns as the default-mime-charset. +<p> +If <var>separator</var> is not nil, it is used as header separator. +</defun> + +<defun name="eword-encode-header"> + <opts> code-conversion +<p> +Encode header fields to network representation, such as MIME +encoded-word. +<p> +It refer variable <code>eword-field-encoding-method-alist</code>. +</defun> + + +<h1> 一般設定 +<node> custom +<p> +<define type="group" name="mime"> +<p> +MIME 関連機能に関する group. +<p> +<code>mail</code> と <code>news</code> に属する。 +</define> + +<defvar name="default-mime-charset"> +<p> +適切な <dref>MIME charset</dref> が見つからなかった場合に用いられる +MIME charset. +<p> +本来は APEL の変数である。 +</defvar> + +<defvar name="mime-temp-directory"> +<p> +MIME 機能に関する実装が一時的に使用する file を作成する directory. +<p> +環境変数 <code>MIME_TMP_DIR</code>, <code>TM_TMP_DIR</code>, +<code>TMPDIR</code>, <code>TMP</code> もしくは <code>TEMP</code> が設定 +されていた場合、それを初期値として用いる。何も設定されていない場合、 +<code>"/tmp/"</code> を用いる。 +</defvar> + + +<h1> Appendix +<node> Appendix + +<h2> Glossary +<node> Glossary + +<h3> 7bit +<node> 7bit +<p> +<concept>7bit</concept> means any integer between 0 .. 127. +<p> +Any data represented by 7bit integers is called <concept>7bit +data</concept>. +<p> +Textual string consisted of Control characters between 0 .. 31 and +127, and space represented by 32, and graphic characters between 33 +.. 236 are called <concept>7bit (textual) string</concept>. +<p> +Conventional Internet <a node="MTA">MTA</a> can translate 7bit data, +so it is no need to translate by <a +node="Quoted-Printable">Quoted-Printable</a> or <a +node="Base64">Base64</a> for 7bit data. +<p> +However if there are too long lines, it can not translate by 7bit MTA +even if it is 7bit data. <dref>RFC 821</dref> and <dref>RFC +2045</dref> require lines in 7bit data must be less than 998 bytes. +So if a ``7bit data'' has a line more than 999 bytes, it is regarded +as <dref>binary</dref>. For example, Postscript file should be +encoded by Quoted-Printable. + + +<h3> 8bit +<node> 8bit +<p> +<concept>8bit</concept> means any integer between 0 .. 255. +<p> +Any data represented by 8bit integers is called <concept>8bit +data</concept>. +<p> +Textual string consisted of Control characters between 0 .. 31, 127, +and 128 .. 159, and space represented by 32, and graphic characters +between 33 .. 236 and 160 .. 255 are called <concept>8bit (textual) +string</concept>. +<p> +For example, <dref>iso-8859-1</dref> or <dref>euc-kr</dref> are +coded-character-set represented by 8bit textual string. +<p> +Traditional Internet <a node="MTA">MTA</a> can translate only +<dref>7bit</dref> data, so if a 8bit data will be translated such MTA, +it must be encoded by <dref>Quoted-Printable</dref> or +<dref>Base64</dref>. +<p> +However 8bit MTA are increasing today. +<p> +However if there are too long lines, it can not translate by 8bit MTA +even if it is 8bit data. <dref>RFC 2045</dref> require lines in 8bit +data must be less than 998 bytes. So if a ``8bit data'' has a line +more than 999 bytes, it is regarded as <dref>binary</dref>, so it must +be encoded by Base64 or Quoted-Printable. + + +<h3> ASCII +<node> ASCII +<p> +<concept>ASCII</concept> is a 94-character set contains primary latin +characters (A-Z, a-z), numbers and some characters. It is a standard +of the United States of America. It is a variant of <a node="ISO +646">ISO 646</a>. + +<standard abbrev="ASCII" title-en="Coded Character Set -- 7-Bit + American Standard Code for Information Interchange" + number="ANSI X3.4" year="1986"> + + +<h3> Base64 +<node> Base64 +<p> +<concept>Base64</concept> is a transfer encoding method of +<dref>MIME</dref> defined in <dref>RFC 2045</dref>. +<p> +The encoding process represents 24-bit groups of input bits as output +strings of 4 encoded characters. Encoded characters represent integer +0 .. 63 or <concept>pad</concept>. Base64 data must be 4 * n bytes, +so pad is used to adjust size. +<p> +These 65 characters are subset of all versions of ISO 646, including +US-ASCII, and all versions of EBCDIC. So it is safe even if it is +translated by non-Internet gateways. + + +<h3> binary +<node> binary +<p> +Any byte stream is called <concept>binary</concept>. +<p> +It does not require structureof lines. It differs from from <a +node="8bit">8bit</a>. +<p> +In addition, if line structured data contain too long line (more than +998 bytes), it is regarded as binary. + + +<h3> Coded character set, Character code +<node> coded character set +<p> +A set of unambiguous rules that establishes a character set and the +one-to-one relationship between the characters of the set and their +bit combinations. + + +<h3> media-type +<node> media-type +<p> +<concept>media-type</concept> specifies the nature of the data in the +body of <dref>MIME</dref> <dref>entity</dref>. It consists of +<concept>type</concept> and <concept>subtype</concept>. It is defined +in <dref>RFC 2046</dref>. +<p> +Currently there are following standard primary-types: + +<ul> +<li><concept>text</concept> +</li> +<li><concept>image</concept> +</li> +<li><concept>audio</concept> +</li> +<li><concept>video</concept> +</li> +<li><concept>application</concept> +</li> +<li><a node="multipart"><concept>multipart</concept></a> +</li> +<li><concept>message</concept> +</ul> + +<p> +And there are various subtypes, for example, application/octet-stream, +audio/basic, image/jpeg, <dref>multipart/mixed</dref>, +<dref>text/plain</dref>, video/mpeg... + +<p> +You can refer registered media types at <a +href="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types">MEDIA +TYPES</a>. +<p> +In addition, you can use private type or subtype using +<concept>x-token</concept>, which as the prefix `x-'. However you can +not use them in public. +<p> +<cf node="Content-Type field"> + + +<h3> message +<node> message +<p> +In this document, it means mail defined in <dref>RFC 822</dref> and +news message defined in <dref>RFC 1036</dref>. + + +<h3> MIME +<node> MIME +<p> +MIME stands for <concept>Multipurpose Internet Mail +Extensions</concept>, it is an extension for <dref>RFC 822</dref>. +<p> +According to RFC 2045: +<p> +STD 11, RFC 822, defines a message representation protocol specifying +considerable detail about US-ASCII message headers, and leaves the +message content, or message body, as flat US-ASCII text. This set of +documents, collectively called the Multipurpose Internet Mail +Extensions, or MIME, redefines the format of messages to allow for + +<ol> +<li>textual message bodies in character sets other than US-ASCII, +</li> +<li>an extensible set of different formats for non-textual message +bodies, +</li> +<li>multi-part message bodies, and +</li> +<li>textual header information in character sets other than US-ASCII. +</ol> + +<p> +It is defined in <dref>RFC 2045</dref>, <dref>RFC 2046</dref>, <a +node="encoded-word">RFC 2047</a>, <dref>RFC 2048</dref> and <dref>RFC +2049</dref>. + + +<h3> MIME charset +<node> MIME charset +<p> +<a node="coded character set">Coded character set</a> used in +<dref>Content-Type field</dref> or charset parameter of <a +node="encoded-word">encoded-word</a>. +<p> +It is defined in <dref>RFC 2045</dref>. +<p> +<dref>iso-2022-jp</dref> or <dref>euc-kr</dref> are kinds of it. (In +this document, MIME charsets are written by small letters to +distinguish <dref>graphic character set</dref>. For example, ISO +8859-1 is a graphic character set, and iso-8859-1 is a MIME charset) + + +<h3> MTA +<node> MTA +<p> +<concept>Message Transfer Agent</concept>. It means mail transfer +programs (ex. sendmail) and news servers. +<p> +<cf node="MUA"> + + +<h3> MUA +<node> MUA +<p> +<concept>Message User Agent</concept>. It means mail readers and news +readers. +<p> +<cf node="MTA"> + + +<h3> Quoted-Printable +<node> Quoted-Printable +<p> +<concept>Quoted-Printable</concept> is a transfer encoding method of +<dref>MIME</dref> defined in <dref>RFC 2045</dref>. +<p> +If the data being encoded are mostly US-ASCII text, the encoded form +of the data remains largely recognizable by humans. +<p> +<cf node="Base64"> + + +<h3> RFC 822 +<node> RFC 822 +<p> +A RFC defines format of Internet mail message, mainly <concept>message +header</concept>. + +<memo> +<p> +news message is based on RFC 822, so <concept>Internet +message</concept> may be more suitable than <concept>Internet +mail</concept> . +</memo> + +<rfc number="822" type="STD 11" author="D. Crocker" title="Standard + for the Format of ARPA Internet Text Messages" + date="August 1982"> + + +<h3> RFC 1036 +<node> RFC 1036 +<p> +A RFC defines format of USENET message. It is a subset of <dref>RFC +822</dref>. It is not Internet standard, but a lot of netnews +excepting Usenet uses it. + +<rfc name="USENET" number="1036" author="M. Horton and R. Adams" + title="Standard for Interchange of USENET Messages" + date="December 1987" obsolete="850"> + + +<h3> RFC 2045 +<node> RFC 2045 +<p> +<rfc number="2045" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part One: Format of Internet Message + Bodies" date="November 1996" obsolete="1521, 1522, + 1590"> + + +<h3> RFC 2046 +<node> RFC 2046 +<p> +<rfc number="2046" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part Two: Media Types" + date="November 1996" obsolete="1521, 1522, 1590"> + + +<h3> RFC 2048 +<node> RFC 2048 +<p> +<rfc number="2048" type="Standards Track" author="N. Freed, J. Klensin + and J. Postel" title="Multipurpose Internet Mail + Extensions (MIME) Part Four: Registration Procedures" + date="November 1996" obsolete="1521, 1522, 1590"> + + +<h3> RFC 2049 +<node> RFC 2049 +<p> +<rfc number="2049" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part Five: Conformance Criteria and + Examples" date="November 1996" obsolete="1521, 1522, + 1590"> + + +<h3> plain text +<node> plain text +<p> +A textual data represented by only <dref>coded character set</dref>. +It does not have information about font or typesetting. +<cf node="text/plain"> + + +<h3> us-ascii +<node> us-ascii +<p> +A <a node="MIME charset">MIME charset</a> for primary Latin script +mainly written by English or other languages. +<p> +It is a 7bit <dref>coded character set</dref> based on <dref>ISO +2022</dref>, it contains only +<dref>ASCII</dref> and <dref>code extension</dref> is not allowed. +<p> +It is standard coded character set of Internet mail. If MIME charset +is not specified, <concept>us-ascii</concept> is used as default. +<p> +In addition, <concept>ASCII</concept> of <dref>RFC 822</dref> should +be interpreted as us-ascii. + + +<h2> How to report bugs +<node> Bug report +<p> +If you write bug-reports and/or suggestions for improvement, please +send them to the tm Mailing List: + +<ul> +<li> Japanese <mail>bug-tm-ja@chamonix.jaist.ac.jp</mail> +<li> English <mail>bug-tm-en@chamonix.jaist.ac.jp</mail> +</ul> + +<p> +Notice that, we do not welcome bug reports about too old version. +Bugs in old version might be fixed. So please try latest version at +first. +<p> +You should write <concept>good bug report</concept>. If you write +only ``FLIM does not work'', we can not find such situations. At +least, you should write name, type, variants and version of OS, emacs, +APEL, FLIM, SEMI and MUA, and setting. In addition, if error occurs, +to send backtrace is very important. <cf file="emacs" node="Bugs"> +<p> +Bug may not appear only your environment, but also in a lot of +environment (otherwise it might not bug). Therefor if you send mail +to author directly, we must write a lot of mails. So please send mail +to address for tm bugs instead of author. + +<p> +Via the tm ML, you can report FLIM bugs, obtain the latest release of +FLIM, and discuss future enhancements to FLIM. To join the tm ML, +send empty e-mail to: + +<ul> +<li> Japanese <mail>tm-ja-help@chamonix.jaist.ac.jp</mail> +<li> English <mail>tm-en-help@chamonix.jaist.ac.jp</mail> +</ul> + + +<h2> CVS based development +<node> CVS +<p> +FLIM の file は CVS を使って管理されています。このため、以下の方法で最 +新の FLIM を入手することができます: + +<verb> +(0) cvs login + + % cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \ + login + + CVS password: [CR] # NULL string + +(1) checkout + + % cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \ + checkout [-r TAG] flim +</verb> + +<p> +CVS を用いた開発に参加したい方は + +<ul> +<li> <mail>cvs@chamonix.jaist.ac.jp</mail> +</ul> + +<noindent> +まで、account 名と UNIX の passwd と同じ形式の crypt 化された password +を沿えて御連絡ください。 + + +<h2> History of FLIM +<node> History +<p> +FLIM の code の最古の部分は 榎並 嗣智 氏が書いた <file>mime.el</file> +に起源します。この小さな program は Nemacs で動作する iso-2022-jp の +B-encoding 専用の encoded-word の復号化プログラムでした。 +<p> +その後、守岡 知彦 は <file>mime.el</file> を元に +<file>tiny-mime.el</file> というプログラムを書きます。これは、Nemacs +と Mule で動作する encoded-word の符号化・復号化プログラムでした。 +<file>tiny-mime.el</file> は B-encoding だけでなく Q-encoding も +support し、また、MULE で扱うことができるさまざまな <dref>MIME +charset</dref> を同時に使うことができました。この時、Nemacs と Mule の +双方を support するために用いられたテクニックは後に emu package にまと +められます。 +<p> +この頃、守岡 知彦 は <file>tiny-mime.el</file> をさまざまな MUA で使う +ための設定集も配布していましたが、それらは後に +<file>tiny-mime.el</file> とともに1つの package にまとめられ、tm とい +う名前で配布されます。 +<p> +守岡 知彦 はやがて、MIME message を閲覧するためのプログラムである +<file>tm-body.el</file> を書きます。これは、すぐに +<file>tm-view.el</file> という名前に変わりましたが、やがて、これが +<file>tiny-mime.el</file> に代わって、tm の中核となります。 +<p> +<file>tm-view.el</file> は当然、Content-Transfer-Encoding を扱う必要が +あります。この目的のために、MEL が整備されはじめました。Base64 に関し +ては <file>tiny-mime.el</file> の code が移され、また、新たに +Quoted-Printable の code が追加されました。これらが +<file>mel-b.el</file> と <file>mel-q.el</file> になりました。 +<p> +また、後に、守岡 知彦 によって uuencode 用の <file>mel-u.el</file> が +追加され、その後に、小林 修平 氏によって x-gzip64 用の +<file>mel-g.el</file> が追加されました。 +<p> +tm では後に、守岡 知彦 によって <file>tiny-mime.el</file> の再実装が行 +われ、この過程で、STD 11 の parser が書かれました。これは、現在の +<file>std11.el</file> に当たります。また、この過程で +<file>tiny-mime.el</file> は復号化を行う <file>tm-ew-d.el</file> と符 +号化を行う <file>tm-ew-e.el</file> に分けられました。この両者が現在の +<file>eword-decode.el</file> と <file>eword-encode.el</file> の先祖に +当たります。 +<p> +後に、守岡 知彦 らによって tm の全面書き換え作業が行われ、この過程で、 +tm は APEL, MEL, SEMI, EMH, RMAIL-MIME, Gnus-MIME などに分けられました。 +このうちの MEL が FLIM の直接の先祖に当たります。 +<p> +後に、APEL から <file>std11.el</file> が移され、また、 +<file>mailcap.el</file>, <file>eword-decode.el</file> および +<file>eword-encode.el</file> が SEMI から移され、package の名前が FLIM +となります。 +<p> +この直前から田中 哲 氏がより RFC に忠実な実装を書き始め、これは、現在、 +FLIM の枝である ``FLIM-FLAM'' となっています。 + + +<h1> Concept Index +<node> Concept Index + +<cindex> + + +<h1> Function Index +<node> Function Index + +<findex> + + +<h1> Variable Index +<node> Variable Index + +<vindex> + +</body>