1 <!doctype sinfo system>
3 <title>FLIM 1.9 Manual about MIME Features
4 <author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail>
14 This file documents MIME features of FLIM, a Internet message
15 parsing/encoding library for GNU Emacs.
22 FLIM is a library to provide basic features about message
23 representation or encoding.
26 <h1> How to use MIME features
29 Please eval following to use MIME features provided by FLIM:
36 <h1> Message and Entity
39 According to <dref>RFC 2045</dref>, `The term ``entity'', refers
40 specifically to the MIME-defined header fields and contents of either
41 a message or one of the parts in the body of a multipart entity.' In
42 this document, the term <concept>entity</concept> indicates all of
43 header fields and body.
45 The definition of RFC 2045 indicates that a MIME message is a tree,
46 and each node of the tree is an entity. Namely MIME extends message
49 FLIM uses <concept>mime-entity</concept> structure to represent
50 information of entity. In this document, it is called simply
54 <h2> Functions to create mime-entity
55 <node> Entity creation
57 <defun name="mime-open-entity">
60 Open an entity and return it.
62 <var>type</var> is representation-type. <cf node="mm-backend">
64 <var>location</var> is location of entity. Specification of it is
65 depended on representation-type.
68 <defun name="mime-parse-buffer">
71 Parse <var>buffer</var> as message, and set the result to buffer local
72 variable <code>mime-message-structure</code> of <var>buffer</var> as
75 If <var>buffer</var> is omitted, current buffer is used.
77 <var>type</var> is representation-type of created mime-entity. <cf
78 node="mm-backend"> Default value is <var>buffer</var>.
82 <h2> Features about message tree
83 <node> Entity hierarchy
85 Structure of a MIME message is tree.
87 In the tree, root node is the entity indicates all of the message. In
88 this document, it is called <concept>root-entity</concept> or
89 <concept>message</concept>. In FLIM, it is indicated by buffer local
90 variable <code>mime-message-structure</code>.
92 Each entity except root-entity has a parent. An entity may have
93 children. We can indicate an entity by relative position from a base
94 entity, based on the parent-child relationship.
96 In addition, we can indicate an entity by absolute position of the
99 Each entity, which is a node of the tree, can be numbered by
100 depth and left-to-right order of the depth.
106 +-------------------+-------------------+
110 | +---------+---------+ |
111 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+
112 | 0.0 | | 1.0 | | 1.1 | | 1.2 | | 2.0 |
113 +-----+ +-----+ +-----+ +-----+ +-----+
117 Namely, if depth of a node is n, the node has a node-number, which is
118 consists of n integers. In this document, it is called
119 <concept>entity-number</concept>. An entity-number is represented by
120 list of integer, like <code>(1 2 3)</code>.
122 mime-entity has also <concept>node-id</concept>. A node-id is
123 represented by reversed list of entity-number. For example, node-id
124 corresponding with 1.2.3 is <code>(3 2 1)</code>.
126 Each entity can be indicated by entity-number or node-id in
127 <code>mime-message-structure</code>.
129 <defvar name="mime-message-structure">
131 Buffer local variable to store mime-entity structure of message.
134 <defun name="mime-entity-children">
137 Return list of entities included in the <var>entity</var>.
140 <defun name="mime-entity-parent">
141 <args> entity <opts> message
143 Return parent entity of the <var>entity</var>.
145 If <var>message</var> is specified, it is regarded as root instead of
146 <code>mime-message-structure</code>.
149 <defun name="mime-root-entity-p">
152 Return non-<code>nil</code> if <var>entity</var> is root entity
156 <defun name="mime-entity-node-id">
159 Return node-id of <var>entity</var>.
162 <defun name="mime-entity-number">
165 Return entity-number of <var>entity</var>.
168 <defun name="mime-find-entity-from-number">
169 <args> entity-number <opts> message
171 Return entity from <var>entity-number</var> in <var>message</var>.
173 If <var>message</var> is not specified,
174 <code>mime-message-structure</code> is used.
177 <defun name="mime-find-entity-from-node-id">
178 <args> entity-node-id <opts> message
180 Return entity from <var>entity-node-id</var> in <var>message</var>.
182 If <var>message</var> is not specified,
183 <code>mime-message-structure</code> is used.
187 <h2> Functions about attributes of mime-entity
188 <node> Entity Attributes
190 <defun name="mime-entity-content-type">
193 Return content-type of <var>entity</var>.
194 <cf node="mime-content-type">
197 <defun name="mime-entity-content-disposition">
200 Return content-disposition of <var>entity</var>. <cf
201 node="mime-content-disposition">
204 <defun name="mime-entity-filename">
207 Return file name of <var>entity</var>.
210 <defun name="mime-entity-encoding">
211 <args> entity <opts> default-encoding
213 Return content-transfer-encoding of <var>entity</var>.
214 <cf node="Content-Transfer-Encoding">
216 If the <var>entity</var> does not have Content-Transfer-Encoding
217 field, this function returns <var>default-encoding</var>. If it is
218 nil, <code>"7bit"</code> is used as default value.
221 <defun name="mime-entity-cooked-p">
224 Return non-nil if contents of <var>entity</var> has been already
229 <h2> Information of entity header
232 <defun name="mime-fetch-field">
233 <args> field-name <opts> entity
235 Return field-body of <var>field-name</var> field in header of
238 The results is network representation.
240 If <var>entity</var> is omitted, <code>mime-message-structure</code>
241 is used as default value.
243 If <var>field-name</var> field is not found, this function returns
247 <defun name="mime-read-field">
248 <args> field-name <opts> entity
250 Parse <var>field-name</var> field in header of <var>entity</var>, and
253 Format of result is depended on kind of field. For non-structured
254 field, this function returns string. For structured field, it returns
255 list corresponding with structure of the field.
257 Strings in the result will be converted to internal representation of
260 If <var>entity</var> is omitted, <code>mime-message-structure</code>
261 is used as default value.
263 If <var>field-name</var> field is not found, this function returns
267 <defun name="mime-insert-decoded-header">
268 <args> entity <opts> invisible-fields visible-fields
270 Insert before point a decoded contents of header of <var>entity</var>.
272 <var>invisible-fields</var> is list of regexps to match field-name to
273 hide. <var>visible-fields</var> is list of regexps to match
276 If a field-name is matched with some elements of
277 <var>invisible-fields</var> and matched with none of
278 <var>visible-fields</var>, this function don't insert the field.
282 <h2> Contents of Entity
283 <node> Entity-content
285 <defun name="mime-entity-content">
288 Return content of <var>entity</var> as byte sequence.
291 <defun name="mime-write-entity-content">
292 <args> entity filename
294 Write content of <var>entity</var> into <var>filename</var>.
297 <defun name="mime-write-entity">
298 <args> entity filename
300 Write representation of <var>entity</var> into <var>filename</var>.
303 <defun name="mime-write-entity-body">
304 <args> entity filename
306 Write body of <var>entity</var> into <var>filename</var>.
310 <h2> Entity as buffer representation
313 <defun name="mime-entity-buffer">
316 Return buffer, which contains <var>entity</var>.
319 <defun name="mime-entity-point-min">
322 Return the start point of <var>entity</var> in the buffer which
323 contains <var>entity</var>.
326 <defun name="mime-entity-point-max">
329 Return the end point of <var>entity</var> in the buffer which
330 contains <var>entity</var>.
333 <defun name="mime-entity-header-start">
336 Return the start point of header of <var>entity</var> in the buffer
337 which contains <var>entity</var>.
340 <defun name="mime-entity-header-end">
343 Return the end point of header of <var>entity</var> in the buffer
344 which contains <var>entity</var>.
347 <defun name="mime-entity-body-start">
350 Return the start point of body of <var>entity</var> in the buffer
351 which contains <var>entity</var>.
354 <defun name="mime-entity-body-end">
357 Return the end point of body of <var>entity</var> in the buffer which
358 contains <var>entity</var>.
362 <h2> Entity representations and implementations
365 Entity is an abstraction. It is designed to use various data
366 representations for their purposes.
368 Each entity has <concept>representation-type</concept>. It must be
369 specified when an entity is created. <cf node="Entity Creation">
371 Functions about entity are implemented by request processing to the
372 entity. Each entity knows its representation-type. Each entity calls
373 processing function corresponding with the representation-type. Such
374 kind of function is called <concept>entity processing
375 method</concept>. A module, consists of them corresponding with a
376 representation-type, is called <concept>mm-backend</concept>.
378 Module name of each mm-backend consists of the prefix <code>mm</code>
379 and its representation-type. The module is required automatically
380 when its entity is created at first.
383 <h3> Message-passing for entity
384 <node> Request for entity
386 <defun name="mime-entity-send">
387 <args> entity message <rest> args
389 Send <var>message</var> to <var>entity</var> with <var>args</var>, and
392 <var>args</var> is arguments of the <var>message</var>.
396 <h3> How to make mm-backend
397 <node> mm-backend module
399 (It is not written yet, sorry. (^_^;)
404 <h1> Information of Content-Type field
407 <concept>Content-Type field</concept> is a field to indicate kind of
408 contents or data format, such as <dref>media-type</dref> and MIME
409 charset. It is defined in <dref>RFC 2045</dref>.
413 Historically, Content-Type field was proposed in RFC 1049. In it,
414 Content-Type did not distinguish type and subtype, and there are no
415 mechanism to represent kind of character code like MIME charset.
419 FLIM provides parser for Content-Type field and structure
420 <concept>mime-content-type</concept> to store information of
424 <h2> Format of Content-Type field
425 <node> Content-Type field
427 Content-Type
\e$BMs$N7A<0$O0J2<$N$h$&$KDj5A$5$l$F$$$^$9!'
\e(B
430 ``Content-Type'' ``:'' <concept>type</concept> ``/''
431 <concept>subtype</concept> *( ``;'' <concept>parameter</concept> )
438 Content-Type: image/jpeg
447 Content-Type: text/plain; charset=iso-2022-jp
452 \e$B$J$I$N$h$&$KMQ$$$i$l$^$9!#
\e(B
454 \e$B$3$3$G!"
\e(B`type'
\e$B$H
\e(B `subtype'
\e$B$O
\e(B entity
\e$B$N7A<0$r<($9$b$N$G!"N><T$rAm>N$7
\e(B
455 \e$B$F!"
\e(B`media-type'
\e$B$H8F$V$3$H$K$7$^$9!#>e5-$NNc$K$*$1$k
\e(B `image/jpeg'
\e$B$d
\e(B
456 `text/plain'
\e$B$O
\e(B media-type
\e$B$N#1$D$G$9!#
\e(B
460 Content-Type
\e$BMs$N$J$$
\e(B entity
\e$B$O
\e(B
464 Content-Type: text/plain; charset=us-ascii
469 \e$B$H$7$F2r<a$5$l$k!#
\e(B<cf node="us-ascii">
473 <h2> mime-content-type structure
474 <node> mime-content-type
476 <define type="Structure" name="mime-content-type">
478 Content-Type
\e$BMs$N>pJs$r3JG<$9$k$?$a$N9=B$BN!#
\e(B
480 \e$B$3$N9=B$BN$r;2>H$9$k$K$O
\e(B <code>mime-content-type-
\e$BMWAGL>
\e(B</code>
\e$B$H$$$&L>
\e(B
481 \e$BA0$N;2>H4X?t$rMQ$$$k!#
\e(B
483 \e$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'
\e(B
486 <dt>primary-type<dd>media-type
\e$B$N<g7?
\e(B (symbol).
488 <dt>subtype<dd>media-type
\e$B$NI{7?
\e(B (symbol).
490 <dt>parameters<dd>Content-Type
\e$BMs$N
\e(B parameter (
\e$BO"A[
\e(B list).
495 <defun name="make-mime-content-type">
498 <p>content-type
\e$B$N@8@.;R!#
\e(B
501 <defun name="mime-content-type-parameter">
502 <args> content-type parameter
504 <var>content-type</var>
\e$B$N
\e(B <var>parameter</var>
\e$B$NCM$rJV$9!#
\e(B
509 <node> Content-Type parser
511 <defun name="mime-parse-Content-Type">
514 <var>string</var>
\e$B$r
\e(B content-type
\e$B$H$7$F2r@O$7$?7k2L$rJV$9!#
\e(B
517 <defun name="mime-read-Content-Type">
519 \e$B8=:_$N
\e(B buffer
\e$B$N
\e(B Content-Type
\e$BMs$rFI$_<h$j!"2r@O$7$?7k2L$rJV$9!#
\e(B
521 Content-Type
\e$BMs$,B8:_$7$J$$>l9g$O
\e(B nil
\e$B$rJV$9!#
\e(B
525 <h2> Utility functions
526 <node> Content-Type utility
528 <defun name="mime-type/subtype-string">
529 <args> type <opts> subtype
531 Return type/subtype string from <var>type</var> and
536 <h1> Information of Content-Disposition field
537 <node> Content-Disposition
539 <concept>Content-Disposition
\e$BMs
\e(B</concept>
\e$B$O
\e(B entity
\e$B$NI=<($d
\e(B file
\e$BL>$J$I
\e(B
540 \e$B$NB0@-$K$J$I$K4X$9$k>pJs$r5-=R$9$k$?$a$N$b$N$G$9!#
\e(B
542 <rfc number="2183" type="Standards Track"
543 author="S. Dorner, K. Moore and R. Troost"
544 title="Communicating Presentation Information in
545 Internet Messages: The Content-Disposition Header"
548 FLIM
\e$B$O
\e(B Content-Disposition
\e$BMs$r9=J82r@O$9$k4X?t$H
\e(B Content-Disposition
549 \e$BMs$N2r@O7k2L$r3JG<$9$k9=B$BN
\e(B
550 <concept>mime-content-disposition</concept>
\e$B$rDs6!$7$^$9!#
\e(B
553 <h2> mime-content-disposition structure
554 <node> mime-content-disposition
556 <define type="Structure" name="mime-content-disposition">
558 Content-Disposition
\e$BMs$N2r@O7k2L$r<}$a$k$?$a$N9=B$BN!#
\e(B
560 \e$B$3$N9=B$BN$r;2>H$9$k$K$O
\e(B <code>mime-content-disposition-
\e$BMWAGL>
\e(B</code>
\e$B$H
\e(B
561 \e$B$$$&L>A0$N;2>H4X?t$rMQ$$$k!#
\e(B
563 \e$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'
\e(B
566 <dt>disposition-type<dd>disposition-type (symbol).
568 <dt>parameters<dd>Content-Disposition
\e$BMs$N
\e(B parameter (
\e$BO"A[
\e(B list).
573 <defun name="mime-content-disposition-parameter">
574 <args> content-disposition parameter
576 <var>content-disposition</var>
\e$B$N
\e(B <var>parameter</var>
\e$B$NCM$rJV$9!#
\e(B
579 <defun name="mime-content-disposition-filename">
580 <args> content-disposition
582 <var>content-disposition</var>
\e$B$N
\e(B filename
\e$B$NCM$rJV$9!#
\e(B
586 <h2> Parser for Content-Disposition field
587 <node> Content-Disposition parser
589 <defun name="mime-parse-Content-Disposition">
592 <var>string</var>
\e$B$r
\e(B content-disposition
\e$B$H$7$F2r@O$7$?7k2L$rJV$9!#
\e(B
595 <defun name="mime-read-Content-Disposition">
597 \e$B8=:_$N
\e(B buffer
\e$B$N
\e(B Content-Disposition
\e$BMs$rFI$_<h$j!"2r@O$7$?7k2L$rJV$9!#
\e(B
599 Content-Disposition
\e$BMs$,B8:_$7$J$$>l9g$O
\e(B nil
\e$B$rJV$9!#
\e(B
604 <node> Content-Transfer-Encoding
606 <concept>Content-Transfer-Encoding
\e$BMs
\e(B</concept>
\e$B$O
\e(B entity
\e$B$NId9f2=K!$r5-
\e(B
607 \e$B=R$9$k$?$a$N$b$N$G$9!#
\e(B
609 FLIM
\e$B$G$O
\e(B Content-Transfer-Encoding
\e$BMs$r9=J82r@O$9$k4X?t$rDs6!$7$^$9!#$3
\e(B
610 \e$B$l$i$N4X?t$O
\e(B Content-Transfer-Encoding
\e$BMs$N>pJs$OJ8;zNs$GI=8=$7$^$9!#
\e(B
612 \e$B$^$?!"
\e(BContent-Transfer-Encoding
\e$B$K4p$E$$$FId9f2=!&I|9f2=$r9T$&4X?t$bDs
\e(B
617 <node> Content-Transfer-Encoding parser
619 <defun name="mime-parse-Content-Transfer-Encoding">
622 <var>string</var>
\e$B$r
\e(B content-transfer-encoding
\e$B$H$7$F2r@O$7$?7k2L$rJV$9!#
\e(B
625 <defun name="mime-read-Content-Transfer-Encoding">
626 <opts>default-encoding
628 \e$B8=:_$N
\e(B buffer
\e$B$N
\e(B Content-Transfer-Encoding
\e$BMs$rFI$_<h$j!"2r@O$7$?7k2L$r
\e(B
631 Content-Transfer-Encoding
\e$BMs$,B8:_$7$J$$>l9g$O
\e(B
632 <var>default-encoding</var>
\e$B$rJV$9!#
\e(B
636 <h2> Region encoding/decoding
637 <node> Region encoder/decoder
639 <defun name="mime-encode-region">
640 <args> start end encoding
642 Encode region <var>start</var> to <var>end</var> of current buffer
643 using <var>encoding</var>.
646 <defun name="mime-decode-region">
647 <args> start end encoding
649 Decode region <var>start</var> to <var>end</var> of current buffer
650 using <var>encoding</var>.
653 <defvar name="mime-encoding-method-alist">
655 Alist of encoding vs. corresponding method to encode region.
657 Each element looks like <code>(STRING . FUNCTION)</code> or
658 <code>(STRING . nil)</code>. <var>string</var> is
659 content-transfer-encoding. <code>function</code> is region encoder
660 and <code>nil</code> means not to encode.
663 <defvar name="mime-decoding-method-alist">
665 Alist of encoding vs. corresponding method to decode region.
667 Each element looks like <code>(STRING . FUNCTION)</code> or
668 <code>(STRING . nil)</code>. <var>string</var> is
669 content-transfer-encoding. <code>function</code> is region decoder
670 and <code>nil</code> means not to decode.
674 <h2> String encoding/decoding
675 <node> String encoder/decoder
677 <defun name="mime-decode-string">
678 <args> string encoding
680 <var>string</var>
\e$B$r
\e(B <var>encoding</var>
\e$B$H$7$FI|9f$7$?7k2L$rJV$7$^$9!#
\e(B
683 <defvar name="mime-string-decoding-method-alist">
685 Alist of encoding vs. corresponding method to decode string.
687 Each element looks like <code>(STRING . FUNCTION)</code>.
688 STRING is content-transfer-encoding.
689 FUNCTION is string decoder.
693 <h2> File encoding/decoding
694 <node> File encoder/decoder
696 <defun name="mime-insert-encoded-file">
697 <args> filename encoding
699 Insert file <var>FILENAME</var> encoded by <var>ENCODING</var> format.
702 <defun name="mime-write-decoded-region">
703 <args> start end filename encoding
705 Decode and write current region encoded by <var>encoding</var> into
708 <var>start</var> and <var>end</var> are buffer positions.
711 <defvar name="mime-file-encoding-method-alist">
713 Alist of encoding vs. corresponding method to insert encoded file.
715 Each element looks like <code>(STRING . FUNCTION)</code>. STRING is
716 content-transfer-encoding. FUNCTION is function to insert encoded
720 <defvar name="mime-file-decoding-method-alist">
722 Alist of encoding vs. corresponding method to write decoded region to
725 Each element looks like <code>(STRING . FUNCTION)</code>. STRING is
726 content-transfer-encoding. FUNCTION is function to write decoded
731 <h1> Network representation of header
734 encoded-word
\e$B$O
\e(B header
\e$B$GHs
\e(B <dref>ASCII</dref>
\e$BJ8;z$rI=8=$9$k$?$a$N7A
\e(B
735 \e$B<0$G!"
\e(B<concept>RFC 2047</concept>
\e$B$GDj5A$5$l$F$$$^$9!#
\e(B
737 <rfc number="2047" type="Standards Track" author="K. Moore"
738 title="MIME (Multipurpose Internet Mail Extensions) Part
739 Three: Message Header Extensions for Non-ASCII Text"
740 date="November 1996" obsolete="1521,1522,1590">
742 \e$B$^$?!"9T57$N0-$$$3$H$@$H8@$($^$9$,!"
\e(Bencoded-word
\e$B$rMQ$$$:$KHs
\e(B
743 <dref>ASCII</dref>
\e$BJ8;z$r
\e(B header
\e$B$KF~$l$?5-;v$bB8:_$7$^$9!#
\e(B
745 FLIM
\e$B$O$3$l$i$rId9f2=!&I|9f2=$9$k5!G=$rDs6!$7$^$9!#
\e(B
748 <h2> Header encoding/decoding
749 <node> Header encoder/decoder
751 <defun name="eword-encode-header">
752 <opts> code-conversion separator
754 Decode MIME encoded-words in header fields.
756 If <var>code-conversion</var> is <code>nil</code>, it decodes only
757 encoded-words. If it is mime-charset, it decodes non-ASCII bit
758 patterns as the mime-charset. Otherwise it decodes non-ASCII bit
759 patterns as the default-mime-charset.
761 If <var>separator</var> is not nil, it is used as header separator.
764 <defun name="eword-encode-header">
765 <opts> code-conversion
767 Encode header fields to network representation, such as MIME
770 It refer variable <code>eword-field-encoding-method-alist</code>.
774 <h1> Various Customization
777 <define type="group" name="mime">
779 MIME
\e$B4XO"5!G=$K4X$9$k
\e(B group.
781 <code>mail</code>
\e$B$H
\e(B <code>news</code>
\e$B$KB0$9$k!#
\e(B
784 <defvar name="default-mime-charset">
786 \e$BE,@Z$J
\e(B <dref>MIME charset</dref>
\e$B$,8+$D$+$i$J$+$C$?>l9g$KMQ$$$i$l$k
\e(B
789 \e$BK\Mh$O
\e(B APEL
\e$B$NJQ?t$G$"$k!#
\e(B
792 <defvar name="mime-temp-directory">
794 MIME
\e$B5!G=$K4X$9$k<BAu$,0l;~E*$K;HMQ$9$k
\e(B file
\e$B$r:n@.$9$k
\e(B directory.
796 \e$B4D6-JQ?t
\e(B <code>MIME_TMP_DIR</code>, <code>TM_TMP_DIR</code>,
797 <code>TMPDIR</code>, <code>TMP</code>
\e$B$b$7$/$O
\e(B <code>TEMP</code>
\e$B$,@_Dj
\e(B
798 \e$B$5$l$F$$$?>l9g!"$=$l$r=i4|CM$H$7$FMQ$$$k!#2?$b@_Dj$5$l$F$$$J$$>l9g!"
\e(B
799 <code>"/tmp/"</code>
\e$B$rMQ$$$k!#
\e(B
812 <concept>7bit</concept> means any integer between 0 .. 127.
814 Any data represented by 7bit integers is called <concept>7bit
817 Textual string consisted of Control characters between 0 .. 31 and
818 127, and space represented by 32, and graphic characters between 33
819 .. 236 are called <concept>7bit (textual) string</concept>.
821 Conventional Internet <a node="MTA">MTA</a> can translate 7bit data,
822 so it is no need to translate by <a
823 node="Quoted-Printable">Quoted-Printable</a> or <a
824 node="Base64">Base64</a> for 7bit data.
826 However if there are too long lines, it can not translate by 7bit MTA
827 even if it is 7bit data. <dref>RFC 821</dref> and <dref>RFC
828 2045</dref> require lines in 7bit data must be less than 998 bytes.
829 So if a ``7bit data'' has a line more than 999 bytes, it is regarded
830 as <dref>binary</dref>. For example, Postscript file should be
831 encoded by Quoted-Printable.
837 <concept>8bit</concept> means any integer between 0 .. 255.
839 Any data represented by 8bit integers is called <concept>8bit
842 Textual string consisted of Control characters between 0 .. 31, 127,
843 and 128 .. 159, and space represented by 32, and graphic characters
844 between 33 .. 236 and 160 .. 255 are called <concept>8bit (textual)
847 For example, <dref>iso-8859-1</dref> or <dref>euc-kr</dref> are
848 coded-character-set represented by 8bit textual string.
850 Traditional Internet <a node="MTA">MTA</a> can translate only
851 <dref>7bit</dref> data, so if a 8bit data will be translated such MTA,
852 it must be encoded by <dref>Quoted-Printable</dref> or
855 However 8bit MTA are increasing today.
857 However if there are too long lines, it can not translate by 8bit MTA
858 even if it is 8bit data. <dref>RFC 2045</dref> require lines in 8bit
859 data must be less than 998 bytes. So if a ``8bit data'' has a line
860 more than 999 bytes, it is regarded as <dref>binary</dref>, so it must
861 be encoded by Base64 or Quoted-Printable.
867 <concept>ASCII</concept> is a 94-character set contains primary latin
868 characters (A-Z, a-z), numbers and some characters. It is a standard
869 of the United States of America. It is a variant of <a node="ISO
872 <standard abbrev="ASCII" title-en="Coded Character Set -- 7-Bit
873 American Standard Code for Information Interchange"
874 number="ANSI X3.4" year="1986">
880 <concept>Base64</concept> is a transfer encoding method of
881 <dref>MIME</dref> defined in <dref>RFC 2045</dref>.
883 The encoding process represents 24-bit groups of input bits as output
884 strings of 4 encoded characters. Encoded characters represent integer
885 0 .. 63 or <concept>pad</concept>. Base64 data must be 4 * n bytes,
886 so pad is used to adjust size.
888 These 65 characters are subset of all versions of ISO 646, including
889 US-ASCII, and all versions of EBCDIC. So it is safe even if it is
890 translated by non-Internet gateways.
896 Any byte stream is called <concept>binary</concept>.
898 It does not require structureof lines. It differs from from <a
899 node="8bit">8bit</a>.
901 In addition, if line structured data contain too long line (more than
902 998 bytes), it is regarded as binary.
905 <h3> Coded character set, Character code
906 <node> coded character set
908 A set of unambiguous rules that establishes a character set and the
909 one-to-one relationship between the characters of the set and their
916 <concept>media-type</concept> specifies the nature of the data in the
917 body of <dref>MIME</dref> <dref>entity</dref>. It consists of
918 <concept>type</concept> and <concept>subtype</concept>. It is defined
919 in <dref>RFC 2046</dref>.
921 Currently there are following standard primary-types:
924 <li><concept>text</concept>
926 <li><concept>image</concept>
928 <li><concept>audio</concept>
930 <li><concept>video</concept>
932 <li><concept>application</concept>
934 <li><a node="multipart"><concept>multipart</concept></a>
936 <li><concept>message</concept>
940 And there are various subtypes, for example, application/octet-stream,
941 audio/basic, image/jpeg, <dref>multipart/mixed</dref>,
942 <dref>text/plain</dref>, video/mpeg...
945 You can refer registered media types at <a
946 href="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types">MEDIA
949 In addition, you can use private type or subtype using
950 <concept>x-token</concept>, which as the prefix `x-'. However you can
951 not use them in public.
953 <cf node="Content-Type field">
959 In this document, it means mail defined in <dref>RFC 822</dref> and
960 news message defined in <dref>RFC 1036</dref>.
966 MIME stands for <concept>Multipurpose Internet Mail
967 Extensions</concept>, it is an extension for <dref>RFC 822</dref>.
969 According to RFC 2045:
971 STD 11, RFC 822, defines a message representation protocol specifying
972 considerable detail about US-ASCII message headers, and leaves the
973 message content, or message body, as flat US-ASCII text. This set of
974 documents, collectively called the Multipurpose Internet Mail
975 Extensions, or MIME, redefines the format of messages to allow for
978 <li>textual message bodies in character sets other than US-ASCII,
980 <li>an extensible set of different formats for non-textual message
983 <li>multi-part message bodies, and
985 <li>textual header information in character sets other than US-ASCII.
989 It is defined in <dref>RFC 2045</dref>, <dref>RFC 2046</dref>, <a
990 node="encoded-word">RFC 2047</a>, <dref>RFC 2048</dref> and <dref>RFC
997 <a node="coded character set">Coded character set</a> used in
998 <dref>Content-Type field</dref> or charset parameter of <a
999 node="encoded-word">encoded-word</a>.
1001 It is defined in <dref>RFC 2045</dref>.
1003 <dref>iso-2022-jp</dref> or <dref>euc-kr</dref> are kinds of it. (In
1004 this document, MIME charsets are written by small letters to
1005 distinguish <dref>graphic character set</dref>. For example, ISO
1006 8859-1 is a graphic character set, and iso-8859-1 is a MIME charset)
1012 <concept>Message Transfer Agent</concept>. It means mail transfer
1013 programs (ex. sendmail) and news servers.
1021 <concept>Message User Agent</concept>. It means mail readers and news
1027 <h3> Quoted-Printable
1028 <node> Quoted-Printable
1030 <concept>Quoted-Printable</concept> is a transfer encoding method of
1031 <dref>MIME</dref> defined in <dref>RFC 2045</dref>.
1033 If the data being encoded are mostly US-ASCII text, the encoded form
1034 of the data remains largely recognizable by humans.
1042 A RFC defines format of Internet mail message, mainly <concept>message
1047 news message is based on RFC 822, so <concept>Internet
1048 message</concept> may be more suitable than <concept>Internet
1052 <rfc number="822" type="STD 11" author="D. Crocker" title="Standard
1053 for the Format of ARPA Internet Text Messages"
1060 A RFC defines format of USENET message. It is a subset of <dref>RFC
1061 822</dref>. It is not Internet standard, but a lot of netnews
1062 excepting Usenet uses it.
1064 <rfc name="USENET" number="1036" author="M. Horton and R. Adams"
1065 title="Standard for Interchange of USENET Messages"
1066 date="December 1987" obsolete="850">
1072 <rfc number="2045" type="Standards Track" author="N. Freed and
1073 N. Borenstein" title="Multipurpose Internet Mail
1074 Extensions (MIME) Part One: Format of Internet Message
1075 Bodies" date="November 1996" obsolete="1521, 1522,
1082 <rfc number="2046" type="Standards Track" author="N. Freed and
1083 N. Borenstein" title="Multipurpose Internet Mail
1084 Extensions (MIME) Part Two: Media Types"
1085 date="November 1996" obsolete="1521, 1522, 1590">
1091 <rfc number="2048" type="Standards Track" author="N. Freed, J. Klensin
1092 and J. Postel" title="Multipurpose Internet Mail
1093 Extensions (MIME) Part Four: Registration Procedures"
1094 date="November 1996" obsolete="1521, 1522, 1590">
1100 <rfc number="2049" type="Standards Track" author="N. Freed and
1101 N. Borenstein" title="Multipurpose Internet Mail
1102 Extensions (MIME) Part Five: Conformance Criteria and
1103 Examples" date="November 1996" obsolete="1521, 1522,
1110 A textual data represented by only <dref>coded character set</dref>.
1111 It does not have information about font or typesetting.
1112 <cf node="text/plain">
1118 A <a node="MIME charset">MIME charset</a> for primary Latin script
1119 mainly written by English or other languages.
1121 It is a 7bit <dref>coded character set</dref> based on <dref>ISO
1122 2022</dref>, it contains only
1123 <dref>ASCII</dref> and <dref>code extension</dref> is not allowed.
1125 It is standard coded character set of Internet mail. If MIME charset
1126 is not specified, <concept>us-ascii</concept> is used as default.
1128 In addition, <concept>ASCII</concept> of <dref>RFC 822</dref> should
1129 be interpreted as us-ascii.
1132 <h2> How to report bugs
1135 If you write bug-reports and/or suggestions for improvement, please
1136 send them to the tm Mailing List:
1139 <li> Japanese <mail>bug-tm-ja@chamonix.jaist.ac.jp</mail>
1140 <li> English <mail>bug-tm-en@chamonix.jaist.ac.jp</mail>
1144 Notice that, we do not welcome bug reports about too old version.
1145 Bugs in old version might be fixed. So please try latest version at
1148 You should write <concept>good bug report</concept>. If you write
1149 only ``FLIM does not work'', we can not find such situations. At
1150 least, you should write name, type, variants and version of OS, emacs,
1151 APEL, FLIM, SEMI and MUA, and setting. In addition, if error occurs,
1152 to send backtrace is very important. <cf file="emacs" node="Bugs">
1154 Bug may not appear only your environment, but also in a lot of
1155 environment (otherwise it might not bug). Therefor if you send mail
1156 to author directly, we must write a lot of mails. So please send mail
1157 to address for tm bugs instead of author.
1160 Via the tm ML, you can report FLIM bugs, obtain the latest release of
1161 FLIM, and discuss future enhancements to FLIM. To join the tm ML,
1162 send empty e-mail to:
1165 <li> Japanese <mail>tm-ja-help@chamonix.jaist.ac.jp</mail>
1166 <li> English <mail>tm-en-help@chamonix.jaist.ac.jp</mail>
1170 <h2> CVS based development
1173 FLIM
\e$B$N
\e(B file
\e$B$O
\e(B CVS
\e$B$r;H$C$F4IM}$5$l$F$$$^$9!#$3$N$?$a!"0J2<$NJ}K!$G:G
\e(B
1174 \e$B?7$N
\e(B FLIM
\e$B$rF~<j$9$k$3$H$,$G$-$^$9!'
\e(B
1179 % cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \
1182 CVS password: [CR] # NULL string
1186 % cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \
1187 checkout [-r TAG] flim
1191 CVS
\e$B$rMQ$$$?3+H/$K;22C$7$?$$J}$O
\e(B
1194 <li> <mail>cvs@chamonix.jaist.ac.jp</mail>
1198 \e$B$^$G!"
\e(Baccount
\e$BL>$H
\e(B UNIX
\e$B$N
\e(B passwd
\e$B$HF1$87A<0$N
\e(B crypt
\e$B2=$5$l$?
\e(B password
1199 \e$B$r1h$($F8fO"Mm$/$@$5$$!#
\e(B
1202 <h2> History of FLIM
1205 FLIM
\e$B$N
\e(B code
\e$B$N:G8E$NItJ,$O
\e(B
\e$B1]JB
\e(B
\e$B;LCR
\e(B
\e$B;a$,=q$$$?
\e(B <file>mime.el</file>
1206 \e$B$K5/8;$7$^$9!#$3$N>.$5$J
\e(B program
\e$B$O
\e(B Nemacs
\e$B$GF0:n$9$k
\e(B iso-2022-jp
\e$B$N
\e(B
1207 B-encoding
\e$B@lMQ$N
\e(B encoded-word
\e$B$NI|9f2=%W%m%0%i%`$G$7$?!#
\e(B
1209 \e$B$=$N8e!"<i2,
\e(B
\e$BCNI'
\e(B
\e$B$O
\e(B <file>mime.el</file>
\e$B$r85$K
\e(B
1210 <file>tiny-mime.el</file>
\e$B$H$$$&%W%m%0%i%`$r=q$-$^$9!#$3$l$O!"
\e(BNemacs
1211 \e$B$H
\e(B Mule
\e$B$GF0:n$9$k
\e(B encoded-word
\e$B$NId9f2=!&I|9f2=%W%m%0%i%`$G$7$?!#
\e(B
1212 <file>tiny-mime.el</file>
\e$B$O
\e(B B-encoding
\e$B$@$1$G$J$/
\e(B Q-encoding
\e$B$b
\e(B
1213 support
\e$B$7!"$^$?!"
\e(BMULE
\e$B$G07$&$3$H$,$G$-$k$5$^$6$^$J
\e(B <dref>MIME
1214 charset</dref>
\e$B$rF1;~$K;H$&$3$H$,$G$-$^$7$?!#$3$N;~!"
\e(BNemacs
\e$B$H
\e(B Mule
\e$B$N
\e(B
1215 \e$BAPJ}$r
\e(B support
\e$B$9$k$?$a$KMQ$$$i$l$?%F%/%K%C%/$O8e$K
\e(B emu package
\e$B$K$^$H
\e(B
1216 \e$B$a$i$l$^$9!#
\e(B
1218 \e$B$3$N:"!"<i2,
\e(B
\e$BCNI'
\e(B
\e$B$O
\e(B <file>tiny-mime.el</file>
\e$B$r$5$^$6$^$J
\e(B MUA
\e$B$G;H$&
\e(B
1219 \e$B$?$a$N@_Dj=8$bG[I[$7$F$$$^$7$?$,!"$=$l$i$O8e$K
\e(B
1220 <file>tiny-mime.el</file>
\e$B$H$H$b$K#1$D$N
\e(B package
\e$B$K$^$H$a$i$l!"
\e(Btm
\e$B$H$$
\e(B
1221 \e$B$&L>A0$GG[I[$5$l$^$9!#
\e(B
1223 \e$B<i2,
\e(B
\e$BCNI'
\e(B
\e$B$O$d$,$F!"
\e(BMIME message
\e$B$r1\Mw$9$k$?$a$N%W%m%0%i%`$G$"$k
\e(B
1224 <file>tm-body.el</file>
\e$B$r=q$-$^$9!#$3$l$O!"$9$0$K
\e(B
1225 <file>tm-view.el</file>
\e$B$H$$$&L>A0$KJQ$o$j$^$7$?$,!"$d$,$F!"$3$l$,
\e(B
1226 <file>tiny-mime.el</file>
\e$B$KBe$o$C$F!"
\e(Btm
\e$B$NCf3K$H$J$j$^$9!#
\e(B
1228 <file>tm-view.el</file>
\e$B$OEvA3!"
\e(BContent-Transfer-Encoding
\e$B$r07$&I,MW$,
\e(B
1229 \e$B$"$j$^$9!#$3$NL\E*$N$?$a$K!"
\e(BMEL
\e$B$,@0Hw$5$l$O$8$a$^$7$?!#
\e(BBase64
\e$B$K4X$7
\e(B
1230 \e$B$F$O
\e(B <file>tiny-mime.el</file>
\e$B$N
\e(B code
\e$B$,0\$5$l!"$^$?!"?7$?$K
\e(B
1231 Quoted-Printable
\e$B$N
\e(B code
\e$B$,DI2C$5$l$^$7$?!#$3$l$i$,
\e(B
1232 <file>mel-b.el</file>
\e$B$H
\e(B <file>mel-q.el</file>
\e$B$K$J$j$^$7$?!#
\e(B
1234 \e$B$^$?!"8e$K!"<i2,
\e(B
\e$BCNI'
\e(B
\e$B$K$h$C$F
\e(B uuencode
\e$BMQ$N
\e(B <file>mel-u.el</file>
\e$B$,
\e(B
1235 \e$BDI2C$5$l!"$=$N8e$K!">.NS
\e(B
\e$B=$J?
\e(B
\e$B;a$K$h$C$F
\e(B x-gzip64
\e$BMQ$N
\e(B
1236 <file>mel-g.el</file>
\e$B$,DI2C$5$l$^$7$?!#
\e(B
1238 tm
\e$B$G$O8e$K!"<i2,
\e(B
\e$BCNI'
\e(B
\e$B$K$h$C$F
\e(B <file>tiny-mime.el</file>
\e$B$N:F<BAu$,9T
\e(B
1239 \e$B$o$l!"$3$N2aDx$G!"
\e(BSTD 11
\e$B$N
\e(B parser
\e$B$,=q$+$l$^$7$?!#$3$l$O!"8=:_$N
\e(B
1240 <file>std11.el</file>
\e$B$KEv$?$j$^$9!#$^$?!"$3$N2aDx$G
\e(B
1241 <file>tiny-mime.el</file>
\e$B$OI|9f2=$r9T$&
\e(B <file>tm-ew-d.el</file>
\e$B$HId
\e(B
1242 \e$B9f2=$r9T$&
\e(B <file>tm-ew-e.el</file>
\e$B$KJ,$1$i$l$^$7$?!#$3$NN><T$,8=:_$N
\e(B
1243 <file>eword-decode.el</file>
\e$B$H
\e(B <file>eword-encode.el</file>
\e$B$N@hAD$K
\e(B
1244 \e$BEv$?$j$^$9!#
\e(B
1246 \e$B8e$K!"<i2,
\e(B
\e$BCNI'
\e(B
\e$B$i$K$h$C$F
\e(B tm
\e$B$NA4LL=q$-49$(:n6H$,9T$o$l!"$3$N2aDx$G!"
\e(B
1247 tm
\e$B$O
\e(B APEL, MEL, SEMI, EMH, RMAIL-MIME, Gnus-MIME
\e$B$J$I$KJ,$1$i$l$^$7$?!#
\e(B
1248 \e$B$3$N$&$A$N
\e(B MEL
\e$B$,
\e(B FLIM
\e$B$ND>@\$N@hAD$KEv$?$j$^$9!#
\e(B
1250 \e$B8e$K!"
\e(BAPEL
\e$B$+$i
\e(B <file>std11.el</file>
\e$B$,0\$5$l!"$^$?!"
\e(B
1251 <file>mailcap.el</file>, <file>eword-decode.el</file>
\e$B$*$h$S
\e(B
1252 <file>eword-encode.el</file>
\e$B$,
\e(B SEMI
\e$B$+$i0\$5$l!"
\e(Bpackage
\e$B$NL>A0$,
\e(B FLIM
1253 \e$B$H$J$j$^$9!#
\e(B
1255 \e$B$3$ND>A0$+$iEDCf
\e(B
\e$BE/
\e(B
\e$B;a$,$h$j
\e(B RFC
\e$B$KCi<B$J<BAu$r=q$-;O$a!"$3$l$O!"8=:_!"
\e(B
1256 FLIM
\e$B$N;^$G$"$k
\e(B ``FLIM-FLAM''
\e$B$H$J$C$F$$$^$9!#
\e(B
1260 <node> Concept Index
1266 <node> Function Index
1272 <node> Variable Index