1 <!doctype sinfo system>
3 <title>FLIM 1.10 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
268 <h2> Text presentation of entity
269 <node> entity formatting
271 <defun name="mime-insert-header">
272 <args> entity <opts> invisible-fields visible-fields
274 Insert before point a decoded contents of header of <var>entity</var>.
276 <var>invisible-fields</var> is list of regexps to match field-name to
277 hide. <var>visible-fields</var> is list of regexps to match
280 If a field-name is matched with some elements of
281 <var>invisible-fields</var> and matched with none of
282 <var>visible-fields</var>, this function don't insert the field.
284 Each <dref>encoded-word</dref> in the header is decoded. ``Raw non
285 us-ascii characters'' are also decoded as
286 <code>default-mime-charset</code>.
289 <defun name="mime-insert-text-content">
292 Insert before point a contents of <var>entity</var> as text entity.
294 Contents of the <var>entity</var> are decoded as <dref>MIME
295 charset</dref>. If the <var>entity</var> does not have charset
296 parameter of Content-Type field, <code>default-mime-charset</code> is
297 used as default value.
300 <defvar name="default-mime-charset">
302 Symbol to indicate default value of <dref>MIME-charset</dref>.
304 It is used when MIME-charset is not specified.
306 It is originally variable of APEL.
310 <h2> Contents of Entity
311 <node> Entity-content
313 <defun name="mime-entity-content">
316 Return content of <var>entity</var> as byte sequence.
319 <defun name="mime-write-entity-content">
320 <args> entity filename
322 Write content of <var>entity</var> into <var>filename</var>.
325 <defun name="mime-write-entity">
326 <args> entity filename
328 Write representation of <var>entity</var> into <var>filename</var>.
331 <defun name="mime-write-entity-body">
332 <args> entity filename
334 Write body of <var>entity</var> into <var>filename</var>.
338 <h2> Entity as buffer representation
341 <defun name="mime-entity-buffer">
344 Return buffer, which contains <var>entity</var>.
347 <defun name="mime-entity-point-min">
350 Return the start point of <var>entity</var> in the buffer which
351 contains <var>entity</var>.
354 <defun name="mime-entity-point-max">
357 Return the end point of <var>entity</var> in the buffer which
358 contains <var>entity</var>.
361 <defun name="mime-entity-header-start">
364 Return the start point of header of <var>entity</var> in the buffer
365 which contains <var>entity</var>.
368 <defun name="mime-entity-header-end">
371 Return the end point of header of <var>entity</var> in the buffer
372 which contains <var>entity</var>.
375 <defun name="mime-entity-body-start">
378 Return the start point of body of <var>entity</var> in the buffer
379 which contains <var>entity</var>.
382 <defun name="mime-entity-body-end">
385 Return the end point of body of <var>entity</var> in the buffer which
386 contains <var>entity</var>.
390 <h2> Entity representations and implementations
393 Entity is an abstraction. It is designed to use various data
394 representations for their purposes.
396 Each entity has <concept>representation-type</concept>. It must be
397 specified when an entity is created. <cf node="Entity Creation">
399 Functions about entity are implemented by request processing to the
400 entity. Each entity knows its representation-type. Each entity calls
401 processing function corresponding with the representation-type. Such
402 kind of function is called <concept>entity processing
403 method</concept>. A module, consists of them corresponding with a
404 representation-type, is called <concept>mm-backend</concept>.
406 Module name of each mm-backend consists of the prefix <code>mm</code>
407 and its representation-type. The module is required automatically
408 when its entity is created at first.
411 <h3> Message-passing for entity
412 <node> Request for entity
414 <defun name="mime-entity-send">
415 <args> entity message <rest> args
417 Send <var>message</var> to <var>entity</var> with <var>args</var>, and
420 <var>args</var> is arguments of the <var>message</var>.
424 <h3> Definition of mm-backend
425 <node> mm-backend module
427 <defmacro name="mm-define-backend">
431 Define <var>type</var> as a mm-backend.
433 If <var>PARENTS</var> is specified, <var>type</var> inherits parents.
434 Each parent must be representation-type.
439 (mm-define-backend chao (generic))
443 <defmacro name="mm-define-method">
444 <args> name args <rest> body
446 Define <var>name</var> as a method function of (nth 1 (car
447 <var>args</var>)) backend.
449 <var>args</var> is like an argument list of lambda, but (car
450 <var>args</var>) must be specialized parameter. (car (car
451 <var>args</var>)) is name of variable and (nth 1 (car
452 <var>args</var>)) is name of backend (representation-type).
457 (mm-define-method entity-cooked-p ((entity chao)) nil)
462 <h1> Information of Content-Type field
465 <concept>Content-Type field</concept> is a field to indicate kind of
466 contents or data format, such as <dref>media-type</dref> and MIME
467 charset. It is defined in <dref>RFC 2045</dref>.
471 Historically, Content-Type field was proposed in RFC 1049. In it,
472 Content-Type did not distinguish type and subtype, and there are no
473 mechanism to represent kind of character code like MIME charset.
477 FLIM provides parser for Content-Type field and structure
478 <concept>mime-content-type</concept> to store information of
482 <h2> Format of Content-Type field
483 <node> Content-Type field
485 Format of Content-Type field is defined as follows:
488 ``Content-Type'' ``:'' <concept>type</concept> ``/''
489 <concept>subtype</concept> *( ``;'' <concept>parameter</concept> )
496 Content-Type: image/jpeg
502 Content-Type: text/plain; charset=iso-2022-jp
506 `type' and `subtype' indicate format of an entity. In this document,
507 pair of them is called `media-type'. `image/jpeg' or `text/plain' is
512 If an entity does not have Content-Type field, it is regarded as
517 Content-Type: text/plain; charset=us-ascii
526 <h2> mime-content-type structure
527 <node> mime-content-type
529 <define type="Structure" name="mime-content-type">
531 Structure to store information of a Content-Type field.
533 Applications should use reference functions
534 <code>mime-content-type-SLOT</code> to refer information of the
537 Slots of the structure are following:
540 <dt>primary-type<dd>primary type of media-type (symbol).
542 <dt>subtype<dd>subtype of media-type (symbol).
544 <dt>parameters<dd>parameters of Content-Type field (association-list).
549 <defun name="make-mime-content-type">
552 <p>Constructor of content-type.
555 <defun name="mime-content-type-parameter">
556 <args> content-type parameter
558 Return value of <var>parameter</var> of <var>content-type</var>.
563 <node> Content-Type parser
565 <defun name="mime-parse-Content-Type">
568 Parse <var>string</var> as field-body of Content-Type field.
571 <defun name="mime-read-Content-Type">
573 Read field-body of Content-Type field from current-buffer,
574 and return parsed it.
576 Return <code>nil</code> if Content-Type field is not found.
580 <h2> Utility functions
581 <node> Content-Type utility
583 <defun name="mime-type/subtype-string">
584 <args> type <opts> subtype
586 Return type/subtype string from <var>type</var> and
591 <h1> Information of Content-Disposition field
592 <node> Content-Disposition
594 <concept>Content-Disposition field</concept> is an optional field to
595 specify presentation of an entity or attributes of an entity, such as
598 <rfc number="2183" type="Standards Track"
599 author="S. Dorner, K. Moore and R. Troost"
600 title="Communicating Presentation Information in
601 Internet Messages: The Content-Disposition Header"
604 FLIM provides parser for Content-Disposition field and structure
605 <concept>mime-content-disposition</concept> to store information of
606 Content-Disposition field.
609 <h2> mime-content-disposition structure
610 <node> mime-content-disposition
612 <define type="Structure" name="mime-content-disposition">
614 Structure to store information of a Content-Disposition field.
616 Applications should use reference functions
617 <code>mime-content-disposition-SLOT</code> to refer information of the
620 Slots of the structure are following:
623 <dt>disposition-type<dd>disposition-type (symbol).
625 <dt>parameters<dd>parameters of Content-Disposition field
631 <defun name="mime-content-disposition-parameter">
632 <args> content-disposition parameter
634 Return value of <var>parameter</var> of
635 <var>content-disposition</var>.
638 <defun name="mime-content-disposition-filename">
639 <args> content-disposition
641 Return filename of <var>content-disposition</var>.
645 <h2> Parser for Content-Disposition field
646 <node> Content-Disposition parser
648 <defun name="mime-parse-Content-Disposition">
651 Parse <var>string</var> as field-body of Content-Disposition field,
652 and return the result.
655 <defun name="mime-read-Content-Disposition">
657 Read field-body of Content-Disposition field from current-buffer,
659 Return nil if Content-Disposition field is not found.
664 <node> Content-Transfer-Encoding
666 <concept>Content-Transfer-Encoding field</concept> is a header field
667 to indicate body encoding of a entity.
669 FLIM provides parser functions for Content-Transfer-Encoding field.
670 They represent information of Content-Transfer-Encoding field as
673 In addition, FLIM provides encoder/decoder functions by
674 Content-Transfer-Encoding.
678 <node> Content-Transfer-Encoding parser
680 <defun name="mime-parse-Content-Transfer-Encoding">
683 <var>string</var>
\e$B$r
\e(B content-transfer-encoding
\e$B$H$7$F2r@O$7$?7k2L$rJV$9!#
\e(B
686 <defun name="mime-read-Content-Transfer-Encoding">
687 <opts>default-encoding
689 \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
692 Content-Transfer-Encoding
\e$BMs$,B8:_$7$J$$>l9g$O
\e(B
693 <var>default-encoding</var>
\e$B$rJV$9!#
\e(B
698 <node> encoder/decoder
700 <defun name="mime-encode-region">
701 <args> start end encoding
703 Encode region <var>start</var> to <var>end</var> of current buffer
704 using <var>encoding</var>.
707 <defun name="mime-decode-region">
708 <args> start end encoding
710 Decode region <var>start</var> to <var>end</var> of current buffer
711 using <var>encoding</var>.
715 <defun name="mime-decode-string">
716 <args> string encoding
718 <var>string</var>
\e$B$r
\e(B <var>encoding</var>
\e$B$H$7$FI|9f$7$?7k2L$rJV$7$^$9!#
\e(B
722 <defun name="mime-insert-encoded-file">
723 <args> filename encoding
725 Insert file <var>FILENAME</var> encoded by <var>ENCODING</var> format.
728 <defun name="mime-write-decoded-region">
729 <args> start end filename encoding
731 Decode and write current region encoded by <var>encoding</var> into
734 <var>start</var> and <var>end</var> are buffer positions.
739 <node> Encoding information
741 <defun name="mime-encoding-list">
744 Return list of Content-Transfer-Encoding.
746 If <var>service</var> is specified, it returns available list of
747 Content-Transfer-Encoding for it.
750 <defun name="mime-encoding-alist">
753 Return table of Content-Transfer-Encoding for completion.
755 If <var>service</var> is specified, it returns available list of
756 Content-Transfer-Encoding for it.
760 <h2> How to write encoder/decoder module
763 <defmacro name="mel-define-method">
764 <args> name args <rest> body
766 Define <var>name</var> as a method function of (nth 1 (car (last
767 <var>args</var>))) backend.
769 <var>args</var> is like an argument list of lambda, but (car (last
770 <var>args</var>)) must be specialized parameter. (car (car (last
771 <var>args</var>))) is name of variable and (nth 1 (car (last
772 <var>args</var>))) is name of backend (encoding).
777 (mel-define-method mime-write-decoded-region (start end filename
779 "Decode and write current region encoded by base64 into FILENAME.
780 START and END are buffer positions."
782 (list (region-beginning) (region-end)
783 (read-file-name "Write decoded region to file: ")))
784 (let ((str (buffer-substring start end)))
786 (insert (decode-base64-string str))
787 (write-region-as-binary (point-min) (point-max) filename)
792 <defmacro name="mel-define-method-function">
795 Set <var>spec</var>'s function definition to <var>function</var>.
797 First element of <var>spec</var> is service.
799 Rest of <var>args</var> is like an argument list of lambda, but (car
800 (last <var>args</var>)) must be specialized parameter. (car (car
801 (last <var>args</var>))) is name of variable and (nth 1 (car (last
802 <var>args</var>))) is name of backend (encoding).
807 (mel-define-method-function (mime-encode-string string (nil "base64"))
808 'encode-base64-string)
813 <h2> How to add encoding/decoding service
814 <node> generic function for mel-backend
816 <defmacro name="mel-define-service">
818 <opts> args doc-string
820 Define <var>name</var> as a service for Content-Transfer-Encodings.
822 If <var>args</var> is specified, <var>name</var> is defined as a
823 generic function for the service.
828 (mel-define-service encoded-text-encode-string (string encoding)
829 "Encode STRING as encoded-text using ENCODING.
830 ENCODING must be string.")
835 <h1> Network representation of header
838 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
839 \e$B<0$G!"
\e(B<concept>RFC 2047</concept>
\e$B$GDj5A$5$l$F$$$^$9!#
\e(B
841 <rfc number="2047" type="Standards Track" author="K. Moore"
842 title="MIME (Multipurpose Internet Mail Extensions) Part
843 Three: Message Header Extensions for Non-ASCII Text"
844 date="November 1996" obsolete="1521,1522,1590">
846 \e$B$^$?!"9T57$N0-$$$3$H$@$H8@$($^$9$,!"
\e(Bencoded-word
\e$B$rMQ$$$:$KHs
\e(B
847 <dref>ASCII</dref>
\e$BJ8;z$r
\e(B header
\e$B$KF~$l$?5-;v$bB8:_$7$^$9!#
\e(B
849 FLIM
\e$B$O$3$l$i$rId9f2=!&I|9f2=$9$k5!G=$rDs6!$7$^$9!#
\e(B
852 <h2> Header encoding/decoding
853 <node> Header encoder/decoder
855 <defun name="eword-encode-header">
856 <opts> code-conversion separator
858 Decode MIME encoded-words in header fields.
860 If <var>code-conversion</var> is <code>nil</code>, it decodes only
861 encoded-words. If it is mime-charset, it decodes non-ASCII bit
862 patterns as the mime-charset. Otherwise it decodes non-ASCII bit
863 patterns as the default-mime-charset.
865 If <var>separator</var> is not nil, it is used as header separator.
868 <defun name="eword-encode-header">
869 <opts> code-conversion
871 Encode header fields to network representation, such as MIME
874 It refer variable <code>eword-field-encoding-method-alist</code>.
878 <h1> Various Customization
881 <define type="group" name="mime">
883 MIME
\e$B4XO"5!G=$K4X$9$k
\e(B group.
885 <code>mail</code>
\e$B$H
\e(B <code>news</code>
\e$B$KB0$9$k!#
\e(B
888 <defvar name="mime-temp-directory">
890 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.
892 \e$B4D6-JQ?t
\e(B <code>MIME_TMP_DIR</code>, <code>TM_TMP_DIR</code>,
893 <code>TMPDIR</code>, <code>TMP</code>
\e$B$b$7$/$O
\e(B <code>TEMP</code>
\e$B$,@_Dj
\e(B
894 \e$B$5$l$F$$$?>l9g!"$=$l$r=i4|CM$H$7$FMQ$$$k!#2?$b@_Dj$5$l$F$$$J$$>l9g!"
\e(B
895 <code>"/tmp/"</code>
\e$B$rMQ$$$k!#
\e(B
908 <concept>7bit</concept> means any integer between 0 .. 127.
910 Any data represented by 7bit integers is called <concept>7bit
913 Textual string consisted of Control characters between 0 .. 31 and
914 127, and space represented by 32, and graphic characters between 33
915 .. 236 are called <concept>7bit (textual) string</concept>.
917 Conventional Internet <a node="MTA">MTA</a> can translate 7bit data,
918 so it is no need to translate by <a
919 node="Quoted-Printable">Quoted-Printable</a> or <a
920 node="Base64">Base64</a> for 7bit data.
922 However if there are too long lines, it can not translate by 7bit MTA
923 even if it is 7bit data. <dref>RFC 821</dref> and <dref>RFC
924 2045</dref> require lines in 7bit data must be less than 998 bytes.
925 So if a ``7bit data'' has a line more than 999 bytes, it is regarded
926 as <dref>binary</dref>. For example, Postscript file should be
927 encoded by Quoted-Printable.
933 <concept>8bit</concept> means any integer between 0 .. 255.
935 Any data represented by 8bit integers is called <concept>8bit
938 Textual string consisted of Control characters between 0 .. 31, 127,
939 and 128 .. 159, and space represented by 32, and graphic characters
940 between 33 .. 236 and 160 .. 255 are called <concept>8bit (textual)
943 For example, <dref>iso-8859-1</dref> or <dref>euc-kr</dref> are
944 coded-character-set represented by 8bit textual string.
946 Traditional Internet <a node="MTA">MTA</a> can translate only
947 <dref>7bit</dref> data, so if a 8bit data will be translated such MTA,
948 it must be encoded by <dref>Quoted-Printable</dref> or
951 However 8bit MTA are increasing today.
953 However if there are too long lines, it can not translate by 8bit MTA
954 even if it is 8bit data. <dref>RFC 2045</dref> require lines in 8bit
955 data must be less than 998 bytes. So if a ``8bit data'' has a line
956 more than 999 bytes, it is regarded as <dref>binary</dref>, so it must
957 be encoded by Base64 or Quoted-Printable.
963 <concept>ASCII</concept> is a 94-character set contains primary latin
964 characters (A-Z, a-z), numbers and some characters. It is a standard
965 of the United States of America. It is a variant of <a node="ISO
968 <standard abbrev="ASCII" title-en="Coded Character Set -- 7-Bit
969 American Standard Code for Information Interchange"
970 number="ANSI X3.4" year="1986">
976 <concept>Base64</concept> is a transfer encoding method of
977 <dref>MIME</dref> defined in <dref>RFC 2045</dref>.
979 The encoding process represents 24-bit groups of input bits as output
980 strings of 4 encoded characters. Encoded characters represent integer
981 0 .. 63 or <concept>pad</concept>. Base64 data must be 4 * n bytes,
982 so pad is used to adjust size.
984 These 65 characters are subset of all versions of ISO 646, including
985 US-ASCII, and all versions of EBCDIC. So it is safe even if it is
986 translated by non-Internet gateways.
992 Any byte stream is called <concept>binary</concept>.
994 It does not require structureof lines. It differs from from <a
995 node="8bit">8bit</a>.
997 In addition, if line structured data contain too long line (more than
998 998 bytes), it is regarded as binary.
1001 <h3> Coded character set, Character code
1002 <node> coded character set
1004 A set of unambiguous rules that establishes a character set and the
1005 one-to-one relationship between the characters of the set and their
1012 <concept>media-type</concept> specifies the nature of the data in the
1013 body of <dref>MIME</dref> <dref>entity</dref>. It consists of
1014 <concept>type</concept> and <concept>subtype</concept>. It is defined
1015 in <dref>RFC 2046</dref>.
1017 Currently there are following standard primary-types:
1020 <li><concept>text</concept>
1022 <li><concept>image</concept>
1024 <li><concept>audio</concept>
1026 <li><concept>video</concept>
1028 <li><concept>application</concept>
1030 <li><a node="multipart"><concept>multipart</concept></a>
1032 <li><concept>message</concept>
1036 And there are various subtypes, for example, application/octet-stream,
1037 audio/basic, image/jpeg, <dref>multipart/mixed</dref>,
1038 <dref>text/plain</dref>, video/mpeg...
1041 You can refer registered media types at <a
1042 href="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types">MEDIA
1045 In addition, you can use private type or subtype using
1046 <concept>x-token</concept>, which as the prefix `x-'. However you can
1047 not use them in public.
1049 <cf node="Content-Type field">
1055 In this document, it means mail defined in <dref>RFC 822</dref> and
1056 news message defined in <dref>RFC 1036</dref>.
1062 MIME stands for <concept>Multipurpose Internet Mail
1063 Extensions</concept>, it is an extension for <dref>RFC 822</dref>.
1065 According to RFC 2045:
1067 STD 11, RFC 822, defines a message representation protocol specifying
1068 considerable detail about US-ASCII message headers, and leaves the
1069 message content, or message body, as flat US-ASCII text. This set of
1070 documents, collectively called the Multipurpose Internet Mail
1071 Extensions, or MIME, redefines the format of messages to allow for
1074 <li>textual message bodies in character sets other than US-ASCII,
1076 <li>an extensible set of different formats for non-textual message
1079 <li>multi-part message bodies, and
1081 <li>textual header information in character sets other than US-ASCII.
1085 It is defined in <dref>RFC 2045</dref>, <dref>RFC 2046</dref>, <a
1086 node="encoded-word">RFC 2047</a>, <dref>RFC 2048</dref> and <dref>RFC
1093 <a node="coded character set">Coded character set</a> used in
1094 <dref>Content-Type field</dref> or charset parameter of <a
1095 node="encoded-word">encoded-word</a>.
1097 It is defined in <dref>RFC 2045</dref>.
1099 <dref>iso-2022-jp</dref> or <dref>euc-kr</dref> are kinds of it. (In
1100 this document, MIME charsets are written by small letters to
1101 distinguish <dref>graphic character set</dref>. For example, ISO
1102 8859-1 is a graphic character set, and iso-8859-1 is a MIME charset)
1108 <concept>Message Transfer Agent</concept>. It means mail transfer
1109 programs (ex. sendmail) and news servers.
1117 <concept>Message User Agent</concept>. It means mail readers and news
1123 <h3> Quoted-Printable
1124 <node> Quoted-Printable
1126 <concept>Quoted-Printable</concept> is a transfer encoding method of
1127 <dref>MIME</dref> defined in <dref>RFC 2045</dref>.
1129 If the data being encoded are mostly US-ASCII text, the encoded form
1130 of the data remains largely recognizable by humans.
1138 A RFC defines format of Internet mail message, mainly <concept>message
1143 news message is based on RFC 822, so <concept>Internet
1144 message</concept> may be more suitable than <concept>Internet
1148 <rfc number="822" type="STD 11" author="D. Crocker" title="Standard
1149 for the Format of ARPA Internet Text Messages"
1156 A RFC defines format of USENET message. It is a subset of <dref>RFC
1157 822</dref>. It is not Internet standard, but a lot of netnews
1158 excepting Usenet uses it.
1160 <rfc name="USENET" number="1036" author="M. Horton and R. Adams"
1161 title="Standard for Interchange of USENET Messages"
1162 date="December 1987" obsolete="850">
1168 <rfc number="2045" type="Standards Track" author="N. Freed and
1169 N. Borenstein" title="Multipurpose Internet Mail
1170 Extensions (MIME) Part One: Format of Internet Message
1171 Bodies" date="November 1996" obsolete="1521, 1522,
1178 <rfc number="2046" type="Standards Track" author="N. Freed and
1179 N. Borenstein" title="Multipurpose Internet Mail
1180 Extensions (MIME) Part Two: Media Types"
1181 date="November 1996" obsolete="1521, 1522, 1590">
1187 <rfc number="2048" type="Standards Track" author="N. Freed, J. Klensin
1188 and J. Postel" title="Multipurpose Internet Mail
1189 Extensions (MIME) Part Four: Registration Procedures"
1190 date="November 1996" obsolete="1521, 1522, 1590">
1196 <rfc number="2049" type="Standards Track" author="N. Freed and
1197 N. Borenstein" title="Multipurpose Internet Mail
1198 Extensions (MIME) Part Five: Conformance Criteria and
1199 Examples" date="November 1996" obsolete="1521, 1522,
1206 A textual data represented by only <dref>coded character set</dref>.
1207 It does not have information about font or typesetting.
1208 <cf node="text/plain">
1214 A <a node="MIME charset">MIME charset</a> for primary Latin script
1215 mainly written by English or other languages.
1217 It is a 7bit <dref>coded character set</dref> based on <dref>ISO
1218 2022</dref>, it contains only
1219 <dref>ASCII</dref> and <dref>code extension</dref> is not allowed.
1221 It is standard coded character set of Internet mail. If MIME charset
1222 is not specified, <concept>us-ascii</concept> is used as default.
1224 In addition, <concept>ASCII</concept> of <dref>RFC 822</dref> should
1225 be interpreted as us-ascii.
1228 <h2> How to report bugs
1231 If you write bug-reports and/or suggestions for improvement, please
1232 send them to the tm Mailing List:
1235 <li> Japanese <mail>bug-tm-ja@chamonix.jaist.ac.jp</mail>
1236 <li> English <mail>bug-tm-en@chamonix.jaist.ac.jp</mail>
1240 Notice that, we do not welcome bug reports about too old version.
1241 Bugs in old version might be fixed. So please try latest version at
1244 You should write <concept>good bug report</concept>. If you write
1245 only ``FLIM does not work'', we can not find such situations. At
1246 least, you should write name, type, variants and version of OS, emacs,
1247 APEL, FLIM, SEMI and MUA, and setting. In addition, if error occurs,
1248 to send backtrace is very important. <cf file="emacs" node="Bugs">
1250 Bug may not appear only your environment, but also in a lot of
1251 environment (otherwise it might not bug). Therefor if you send mail
1252 to author directly, we must write a lot of mails. So please send mail
1253 to address for tm bugs instead of author.
1256 Via the tm ML, you can report FLIM bugs, obtain the latest release of
1257 FLIM, and discuss future enhancements to FLIM. To join the tm ML,
1258 send empty e-mail to:
1261 <li> Japanese <mail>tm-ja-help@chamonix.jaist.ac.jp</mail>
1262 <li> English <mail>tm-en-help@chamonix.jaist.ac.jp</mail>
1266 <h2> CVS based development
1269 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
1270 \e$B?7$N
\e(B FLIM
\e$B$rF~<j$9$k$3$H$,$G$-$^$9!'
\e(B
1275 % cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \
1278 CVS password: [CR] # NULL string
1282 % cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \
1283 checkout [-r TAG] flim
1287 CVS
\e$B$rMQ$$$?3+H/$K;22C$7$?$$J}$O
\e(B
1290 <li> <mail>cvs@chamonix.jaist.ac.jp</mail>
1294 \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
1295 \e$B$r1h$($F8fO"Mm$/$@$5$$!#
\e(B
1298 <h2> History of FLIM
1301 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>
1302 \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
1303 B-encoding
\e$B@lMQ$N
\e(B encoded-word
\e$B$NI|9f2=%W%m%0%i%`$G$7$?!#
\e(B
1305 \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
1306 <file>tiny-mime.el</file>
\e$B$H$$$&%W%m%0%i%`$r=q$-$^$9!#$3$l$O!"
\e(BNemacs
1307 \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
1308 <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
1309 support
\e$B$7!"$^$?!"
\e(BMULE
\e$B$G07$&$3$H$,$G$-$k$5$^$6$^$J
\e(B <dref>MIME
1310 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
1311 \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
1312 \e$B$a$i$l$^$9!#
\e(B
1314 \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
1315 \e$B$?$a$N@_Dj=8$bG[I[$7$F$$$^$7$?$,!"$=$l$i$O8e$K
\e(B
1316 <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
1317 \e$B$&L>A0$GG[I[$5$l$^$9!#
\e(B
1319 \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
1320 <file>tm-body.el</file>
\e$B$r=q$-$^$9!#$3$l$O!"$9$0$K
\e(B
1321 <file>tm-view.el</file>
\e$B$H$$$&L>A0$KJQ$o$j$^$7$?$,!"$d$,$F!"$3$l$,
\e(B
1322 <file>tiny-mime.el</file>
\e$B$KBe$o$C$F!"
\e(Btm
\e$B$NCf3K$H$J$j$^$9!#
\e(B
1324 <file>tm-view.el</file>
\e$B$OEvA3!"
\e(BContent-Transfer-Encoding
\e$B$r07$&I,MW$,
\e(B
1325 \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
1326 \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
1327 Quoted-Printable
\e$B$N
\e(B code
\e$B$,DI2C$5$l$^$7$?!#$3$l$i$,
\e(B
1328 <file>mel-b.el</file>
\e$B$H
\e(B <file>mel-q.el</file>
\e$B$K$J$j$^$7$?!#
\e(B
1330 \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
1331 \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
1332 <file>mel-g.el</file>
\e$B$,DI2C$5$l$^$7$?!#
\e(B
1334 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
1335 \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
1336 <file>std11.el</file>
\e$B$KEv$?$j$^$9!#$^$?!"$3$N2aDx$G
\e(B
1337 <file>tiny-mime.el</file>
\e$B$OI|9f2=$r9T$&
\e(B <file>tm-ew-d.el</file>
\e$B$HId
\e(B
1338 \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
1339 <file>eword-decode.el</file>
\e$B$H
\e(B <file>eword-encode.el</file>
\e$B$N@hAD$K
\e(B
1340 \e$BEv$?$j$^$9!#
\e(B
1342 \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
1343 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
1344 \e$B$3$N$&$A$N
\e(B MEL
\e$B$,
\e(B FLIM
\e$B$ND>@\$N@hAD$KEv$?$j$^$9!#
\e(B
1346 \e$B8e$K!"
\e(BAPEL
\e$B$+$i
\e(B <file>std11.el</file>
\e$B$,0\$5$l!"$^$?!"
\e(B
1347 <file>mailcap.el</file>, <file>eword-decode.el</file>
\e$B$*$h$S
\e(B
1348 <file>eword-encode.el</file>
\e$B$,
\e(B SEMI
\e$B$+$i0\$5$l!"
\e(Bpackage
\e$B$NL>A0$,
\e(B FLIM
1349 \e$B$H$J$j$^$9!#
\e(B
1351 \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
1352 FLIM
\e$B$N;^$G$"$k
\e(B ``FLIM-FLAM''
\e$B$H$J$C$F$$$^$9!#
\e(B
1356 <node> Concept Index
1362 <node> Function Index
1368 <node> Variable Index