X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-ja.texi;h=7cd0e1096fa5c8b5fe4fbbb5e43ff7ba61008dfd;hb=41fe6bdf8523a73c43e73612b5df85caa5622081;hp=0ac8e6ae102691a2aa84c879d95562655465e632;hpb=5bfa6dab84c42bf42c9c50019d8808ac986326d1;p=elisp%2Fflim.git diff --git a/mime-ja.texi b/mime-ja.texi index 0ac8e6a..7cd0e10 100644 --- a/mime-ja.texi +++ b/mime-ja.texi @@ -1,21 +1,22 @@ \input texinfo.tex +@c Generated automatically from mime-ja.sgml by sinfo 3.7. @setfilename mime-ja.info -@settitle{FLIM 1.7 MIME $B5!G=@bL@=q(B} +@settitle{FLIM 1.12 MIME $B5!G=@bL@=q(B} @titlepage -@title FLIM 1.7 MIME $B5!G=@bL@=q(B +@title FLIM 1.12 MIME $B5!G=@bL@=q(B @author $B -@subtitle 1998/06/23 +@subtitle 1999-01-27 @end titlepage @node Top, Introduction, (dir), (dir) -@top FLIM 1.7 MIME $B5!G=@bL@=q(B +@top FLIM 1.12 MIME $B5!G=@bL@=q(B @ifinfo -This file documents MIME features of FLIM, a Internet message -parsing/encoding library for GNU Emacs.@refill +This file documents MIME features of FLIM, a fundamental library to +process Internet Messages for GNU Emacsen.@refill -GNU Emacs $BMQ$N(B Internet Message $B$N2r@O$dId9f2=$K4X$9$k(B library $B$G$"$k(B -FLIM $B$N(B MIME $B5!G=$K4X$7$F@bL@$7$^$9!#(B +GNU Emacsen $BMQ$N(B Internet Message $B=hM}$N$?$a$N4pAC(B library $B$G$"$k(B FLIM +$B$N(B MIME $B5!G=$K4X$7$F@bL@$7$^$9!#(B @end ifinfo @menu @@ -55,8 +56,6 @@ FLIM $B$NDs6!$9$k(B MIME $B5!G=$r;H$&$?$a$K$O(B @node Entity, Content-Type, How to use, Top @chapter Message $B$H(B Entity -@cindex node-id -@cindex entity-number @cindex mime-entity @cindex entity @@ -66,16 +65,73 @@ field $B$HFbMF$r;X$9!W$H$J$C$F$$$^$9!#$3$3$G$O!"(BMIME $B$GDj5A$5$l$?(B head field $B0J30$NA4$F$N(B header $B$H(B body $B$r;X$98l$H$7$F(B @strong{entity}$B$rMQ$$$k(B $B$3$H$K$7$^$9!#(B@refill -RFC 2045 $B$NDj5A$O!"(BMIME message $B$,(B entity $B$rC10L$H$9$kLZ9=B$$G$"$k$3$H$r(B -$B<($7$F$$$^$9!#(Bmessage $B$O2pJs$rI=8=$9$k$?$a$K(B@strong{mime-entity} $B9=B$BN$rMQ$$$^(B -$B$9!#0J2<$G$OC1$K(B mime-entity $B$H8F$V$3$H$K$7$^$9!#(B@refill +FLIM $B$O(B entity $B$N>pJs$rI=8=$9$k$?$a$K(B@strong{mime-entity} $B9=(B +$BB$BN$rMQ$$$^$9!#0J2<$G$OC1$K(B mime-entity $B$H8F$V$3$H$K$7$^$9!#(B -$BA0=R$N$h$&$K!"(Bmessage $BCf$N3F(B entity $B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O(B -$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B + +@menu +* Entity creation:: Entity $B$N@8@.(B +* Entity hierarchy:: Entity $B3,AX(B +* Entity Search:: Entity $B$N8!:w(B +* Entity Attributes:: Entity $B$NB0@-(B +* Entity-header:: Entity header $B$N>pJs(B +* entity formatting:: Entity $B$NJ8;zI=8=(B +* Entity-content:: Entity $B$NFbMF(B +* Entity-network-representation:: Entity $B$N%M%C%H%o!<%/I=8=(B +* Entity buffer:: Entity $B$N(B buffer $B$K$h$kI=8=(B +* mm-backend:: Entity $B$NI=8=$HJN,$5$l$?>l9g!"8=:_$N(B buffer $B$r9=J82r@O$9$k!#(B@refill + +@var{type} $B$,;XDj$5$l$?>l9g!"$=$NCM$r@8@.$5$l$k(B mime-entity $B$NI=>]7?$H$7(B +$B$FMQ$$$k!#>JN,$5$l$?>l9g$O(B @var{buffer} $B$H$J$k!#(B(cf. @ref{mm-backend}) +@end defun + + + +@node Entity hierarchy, Entity Search, Entity creation, Entity +@section Entity $B3,AX(B +@cindex node-id +@cindex entity-number +@cindex message +@cindex root-entity + +MIME message $B$O(B entity $B$rC10L$H$9$kLZ9=B$$K$J$C$F$$$^$9!#(B@refill + +$B$3$NLZ$K$*$$$F:,$H$J$k@a$O(B message $BA4BN$rI=$9(B entity $B$G$9!#$3$3$G$O!"$3(B +$B$l$r(B @strong{root-entity} $B$b$7$/$O(B@strong{message} $B$H8F$S$^$9!#(B@refill + +root-entity $B0J30$N(B entity $B$O?F$r;}$A$^$9!#$^$?!"(Bentity $B$O;R6!$r;}$D$+$b(B +$BCN$l$^$;$s!#$3$N?F;R4X78$r9M$($k$3$H$G(B entity $B$NAjBP4X78$r07$&$3$H$,$G$-(B +$B$^$9!#(B@refill + +$B0lJ}!"(Bentity $B$N(B message $B$K$*$1$k0LCV$r9M$($k$3$H$b$G$-$^$9!#(B@refill + +entity $B$O$3$NLZ$K$*$1$k@a$H$J$j$^$9$,!"$3$NLZ$K$O?<$5$HF1$8?<$5$NCf$N(B +$B=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B @example $B(#(!(!(!($(B @@ -102,48 +158,10 @@ node-id $B$O(B @code{(3 2 1)} $B$G$9!#(B@refill $BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B $B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer -local $BJQ?t(B @code{mime-message-structure} $B$K3JG<$9$k$3$H$K$7$^$9!#(B -$B$=$7$F!"(Bentity-number $B$d(B node-id $B$rMQ$$$k$3$H$G(B -@code{mime-message-structure} $B$K$*$1$k(B entity $B$NAjBPE*$J0LCV4X78$r(B -$B07$&$3$H$,$G$-$^$9!#(B - - - - +local $BJQ?t(B @code{mime-message-structure} $B$K3JG<$9$k$3$H$K$7$^$9!#(B@refill - - - -@menu -* Message parser:: Message $B$N2r@O4o(B -* Entity hierarchy:: Entity $B3,AX(B -* Entity buffer:: Entity $B$N(B buffer $B$K$h$kI=8=(B -* Entity-header:: Entity header $B$N>pJs(B -* Entity Attributes:: Entity $B$NB0@-(B -* Entity-content:: Entity $B$NFbMF(B -@end menu - -@node Message parser, Entity hierarchy, Entity, Entity -@section Message $B$N2r@O4o(B - -@defun mime-parse-message &optional default-ctl node-id - -$B8=:_$N(B buffer $B$r(B message $B$H$7$F9=J82r@O$7!"$=$N7k2L$N(B mime-entity $B$rJV$9!#(B -@end defun - - -@defun mime-parse-buffer &optional buffer - -@var{buffer} $B$r(B message $B$H$7$F9=J82r@O$7!"$=$N7k2L$N(B mime-entity $B$r(B -@var{buffer} $B$N(B@code{mime-message-structure} $B$K3JG<$9$k!#(B@refill - -@var{buffer} $B$,>JN,$5$l$?>l9g!"8=:_$N(B buffer $B$r9=J82r@O$9$k!#(B -@end defun - - - -@node Entity hierarchy, Entity buffer, Message parser, Entity -@section Entity $B3,AX(B +@code{mime-message-structure} $B$r5/E@$K(B entity-number $B$d(B node-id +$B$G<($5$l$k(B entity $B$r$rJV$9!#(B @end defun -@defun mime-entity-body-start entity +@defun mime-entity-encoding entity &optional default-encoding -@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(Bbody $B$,@j$a$kNN0h$N@hF,0LCV$rJV(B -$B$9!#(B +@var{entity} $B$N(B content-transfer-encoding $B$rJV$9!#(B +(cf. @ref{Content-Transfer-Encoding}) @refill + +$B$b$7!"(B@var{entity} $B$K(B Content-Transfer-Encoding $BMs$,B8:_$7$J$$>l9g$O!"(B +@var{default-encoding} $B$rJV$9!#$3$l$,;XDj$5$l$J$$>l9g$O!"(B@code{"7bit"} +$B$rMQ$$$k!#(B @end defun -@defun mime-entity-body-end entity +@defun mime-entity-cooked-p entity -@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(Bbody $B$,@j$a$kNN0h$NKvHx0LCV$rJV(B -$B$9!#(B +Return non-nil if contents of @var{entity} has been already +code-converted. @end defun -@node Entity-header, Entity Attributes, Entity buffer, Entity +@node Entity-header, entity formatting, Entity Attributes, Entity @section Entity header $B$N>pJs(B @defun mime-fetch-field field-name &optional entity @@ -268,7 +288,7 @@ used. @var{entity} $B$,>JN,$5$l$?>l9g$O!"(B@code{mime-message-structure} $B$NCM$rMQ(B $B$$$k!#(B@refill -@var{field-name} $BMs$,B8:_$7$J$$>l9g$O(B nil $B$rJV$9!#(B +@var{field-name} $BMs$,B8:_$7$J$$>l9g$O(B @code{nil} $B$rJV$9!#(B @end defun @@ -289,8 +309,11 @@ used. @end defun -@defun mime-insert-decoded-header entity &optional invisible-fields visible-fields - code-conversion + +@node entity formatting, Entity-content, Entity-header, Entity +@section Entity $B$NJ8;zI=8=(B + +@defun mime-insert-header entity &optional invisible-fields visible-fields $B8=:_0LCV$K(B @var{entity} $B$NI|9f$7$?(B header $B$rA^F~$9$k!#(B@refill @@ -300,49 +323,209 @@ used. @var{invisible-fields} $B$NMWAG$N$I$l$+$K(B match $B$7!"$+$D!"(B @var{visible-fields} $B$NMWAG$N$I$l$K$b(B match $B$7$J$$Ms$OI=<($5$l$J$$!#(B +@refill + +encoded-word (@ref{encoded-word}) $B$OI|9f$5$l$k!#!X@8$NHs(B us-ascii $BJ8;z!Y(B +$B$O(B @code{default-mime-charset} $B$H$7$F2rl9g$KMQ$$$i(B +$B$l$k(BMIME charset.@refill + +$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B +@end defvar + + + +@node Entity-content, Entity-network-representation, entity formatting, Entity +@section Entity $B$NFbMF(B + +@defun mime-entity-content entity + +@var{entity} $B$NFbMF$N(B byte $BNs$rJV$9!#(B @end defun -@defun mime-entity-content-disposition entity +@defun mime-insert-entity-content entity -@var{entity} $B$N(B content-disposition $B$rJV$9!#(B -(cf. @ref{mime-content-disposition}) +Insert content of @var{entity} at point. @end defun -@defun mime-entity-filename entity +@defun mime-write-entity-content entity filename -Entity $B$N(B file $BL>$rJV$9!#(B +Write content of @var{entity} into @var{filename}. @end defun -@defun mime-entity-encoding entity -@var{entity} $B$N(B content-transfer-encoding $B$rJV$9!#(B -(cf. @ref{Content-Transfer-Encoding}) +@node Entity-network-representation, Entity buffer, Entity-content, Entity +@section Entity $B$N%M%C%H%o!<%/I=8=(B + +@defun mime-insert-entity entity + +Insert header and body of @var{entity} at point. @end defun +@defun mime-write-entity entity filename -@node Entity-content, , Entity Attributes, Entity -@section Entity $B$NFbMF(B +Write representation of @var{entity} into @var{filename}. +@end defun -@defun mime-entity-content entity -@var{entity} $B$NFbMF$N(B byte $BNs$rJV$9!#(B +@defun mime-write-entity-body entity filename + +Write body of @var{entity} into @var{filename}. +@end defun + + + +@node Entity buffer, mm-backend, Entity-network-representation, Entity +@section Entity $B$N(B buffer $B$K$h$kI=8=(B + +@defun mime-entity-buffer entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$rJV$9!#(B +@end defun + + +@defun mime-entity-point-min entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(B@var{entity} $B$,@j$a$kNN0h$N@hF,(B +$B0LCV$rJV$9!#(B +@end defun + + +@defun mime-entity-point-max entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(B@var{entity} $B$,@j$a$kNN0h$NKvHx(B +$B0LCV$rJV$9!#(B @end defun +@defun mime-entity-header-start entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(Bheader $B$,@j$a$kNN0h$N@hF,0LCV$r(B +$BJV$9!#(B +@end defun + + +@defun mime-entity-header-end entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(Bheader $B$,@j$a$kNN0h$NKvHx0LCV$r(B +$BJV$9!#(B +@end defun + + +@defun mime-entity-body-start entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(Bbody $B$,@j$a$kNN0h$N@hF,0LCV$rJV(B +$B$9!#(B +@end defun + + +@defun mime-entity-body-end entity + +@var{entity} $B$,B8:_$9$k(B buffer $B$K$*$1$k!"(Bbody $B$,@j$a$kNN0h$NKvHx0LCV$rJV(B +$B$9!#(B +@end defun + + + +@node mm-backend, , Entity buffer, Entity +@section Entity $B$NI=8=$H]2=$5$l$?%G!<%?I=8=$G!"A0$N@hF,$K(B @code{mm} $B$H$$$&(B +$B@\F,<-$rIU$1$?4X?tL>$+$i$J$k(B module $B$G!"$=$N(B module $BL>$OF1MM$K(B +representation-type $B$NL>A0$N@hF,$K(B @code{mm} $B$rIU$1$?$b$N$K$J$C$F(B +$B$$$^$9!#$3$N(B module $B$O(B representation-type $B$N(B entity $B$,:G=i$K@8@.$5$l$k(B +$B;~$K<+F0E*$K(B require $B$5$l$^$9!#(B + + +@menu +* Request for entity:: Entity $B$X$NJX$j(B +* mm-backend module:: mm-backend $B$N:n$jJ}(B +@end menu + +@node Request for entity, mm-backend module, mm-backend, mm-backend +@subsection Entity $B$X$NJX$j(B + +@defun mime-entity-send entity message &rest args + +@var{entity} $B$K(B @var{message} $B$rAw$k!#(B@refill + +@var{args} $B$O(B @var{message} $B$N0z?t$G$"$k!#(B +@end defun + + + +@node mm-backend module, , Request for entity, mm-backend +@subsection mm-backend $B$N:n$jJ}(B + +@defmac mm-define-backend type &optional parents + +Define @var{type} as a mm-backend.@refill + +If @var{PARENTS} is specified, @var{type} inherits parents. Each parent +must be representation-type.@refill + +Example:@refill + +@lisp +(mm-define-backend chao (generic)) +@end lisp +@end defmac + + +@defmac mm-define-method name args &rest body + +Define @var{name} as a method function of (nth 1 (car @var{args})) +backend.@refill + +@var{args} is like an argument list of lambda, but (car @var{args}) must +be specialized parameter. (car (car @var{args})) is name of variable +and (nth 1 (car @var{args})) is name of backend +(representation-type).@refill + +Example:@refill + +@lisp +(mm-define-method entity-cooked-p ((entity chao)) nil) +@end lisp +@end defmac + + @node Content-Type, Content-Disposition, Entity, Top @chapter Content-Type $BMs$N>pJs(B @@ -598,12 +781,13 @@ FLIM $B$G$O(B Content-Transfer-Encoding $BMs$r9=J82r@O$9$k4X?t$rDs6!$7$^$9!#$ @menu * Content-Transfer-Encoding parser:: Content-Transfer-Encoding $BMs$N2r@O4o(B -* Region encoder/decoder:: $BNN0h$NId9f2=!&I|9f2=(B -* String encoder/decoder:: $BJ8;zNs$NId9f2=!&I|9f2=(B -* File encoder/decoder:: File $B$NId9f2=!&I|9f2=(B +* encoder/decoder:: $BId9f2=!&I|9f2=(B +* Encoding information:: Other utilities +* mel-backend:: How to write encoder/decoder module +* generic function for mel-backend:: How to add encoding/decoding service @end menu -@node Content-Transfer-Encoding parser, Region encoder/decoder, Content-Transfer-Encoding, Content-Transfer-Encoding +@node Content-Transfer-Encoding parser, encoder/decoder, Content-Transfer-Encoding, Content-Transfer-Encoding @section Content-Transfer-Encoding $BMs$N2r@O4o(B @defun mime-parse-Content-Transfer-Encoding string @@ -623,8 +807,8 @@ Content-Transfer-Encoding $BMs$,B8:_$7$J$$>l9g$O(B@var{default-encoding} $B$r -@node Region encoder/decoder, String encoder/decoder, Content-Transfer-Encoding parser, Content-Transfer-Encoding -@section $BNN0h$NId9f2=!&I|9f2=(B +@node encoder/decoder, Encoding information, Content-Transfer-Encoding parser, Content-Transfer-Encoding +@section $BId9f2=!&I|9f2=(B @defun mime-encode-region start end encoding @@ -640,83 +824,123 @@ Decode region @var{start} to @var{end} of current buffer using @end defun -@defvar mime-encoding-method-alist -Alist of encoding vs. corresponding method to encode region.@refill - -Each element looks like @code{(STRING . FUNCTION)} or @code{(STRING -. nil)}. @var{string} is content-transfer-encoding. @code{function} is -region encoder and @code{nil} means not to encode. -@end defvar +@defun mime-decode-string string encoding +@var{string} $B$r(B @var{encoding} $B$H$7$FI|9f$7$?7k2L$rJV$9!#(B +@end defun -@defvar mime-decoding-method-alist -Alist of encoding vs. corresponding method to decode region.@refill -Each element looks like @code{(STRING . FUNCTION)} or @code{(STRING -. nil)}. @var{string} is content-transfer-encoding. @code{function} is -region decoder and @code{nil} means not to decode. -@end defvar +@defun mime-insert-encoded-file filename encoding +Insert file @var{FILENAME} encoded by @var{ENCODING} format. +@end defun -@node String encoder/decoder, File encoder/decoder, Region encoder/decoder, Content-Transfer-Encoding -@section $BJ8;zNs$NId9f2=!&I|9f2=(B +@defun mime-write-decoded-region start end filename encoding -@defun mime-decode-string string encoding +Decode and write current region encoded by @var{encoding} into +@var{filename}.@refill -@var{string} $B$r(B @var{encoding} $B$H$7$FI|9f$7$?7k2L$rJV$7$^$9!#(B +@var{start} and @var{end} are buffer positions. @end defun -@defvar mime-string-decoding-method-alist -Alist of encoding vs. corresponding method to decode string.@refill +@node Encoding information, mel-backend, encoder/decoder, Content-Transfer-Encoding +@section Other utilities -Each element looks like @code{(STRING . FUNCTION)}. STRING is -content-transfer-encoding. FUNCTION is string decoder. -@end defvar +@defun mime-encoding-list &optional SERVICE +Return list of Content-Transfer-Encoding.@refill +If @var{service} is specified, it returns available list of +Content-Transfer-Encoding for it. +@end defun -@node File encoder/decoder, , String encoder/decoder, Content-Transfer-Encoding -@section File $B$NId9f2=!&I|9f2=(B -@defun mime-insert-encoded-file filename encoding +@defun mime-encoding-alist &optional SERVICE -Insert file @var{FILENAME} encoded by @var{ENCODING} format. +Return table of Content-Transfer-Encoding for completion.@refill + +If @var{service} is specified, it returns available list of +Content-Transfer-Encoding for it. @end defun -@defun mime-write-decoded-region start end filename encoding -Decode and write current region encoded by @var{encoding} into -@var{filename}.@refill +@node mel-backend, generic function for mel-backend, Encoding information, Content-Transfer-Encoding +@section How to write encoder/decoder module -@var{start} and @var{end} are buffer positions. -@end defun +@defmac mel-define-method name args &rest body +Define @var{name} as a method function of (nth 1 (car (last +@var{args}))) backend.@refill -@defvar mime-file-encoding-method-alist +@var{args} is like an argument list of lambda, but (car (last +@var{args})) must be specialized parameter. (car (car (last +@var{args}))) is name of variable and (nth 1 (car (last @var{args}))) is +name of backend (encoding).@refill -Alist of encoding vs. corresponding method to insert encoded -file.@refill +Example:@refill -Each element looks like @code{(STRING . FUNCTION)}. STRING is -content-transfer-encoding. FUNCTION is function to insert encoded file. -@end defvar +@lisp +(mel-define-method mime-write-decoded-region (start end filename + (nil "base64")) + "Decode and write current region encoded by base64 into FILENAME. +START and END are buffer positions." + (interactive + (list (region-beginning) (region-end) + (read-file-name "Write decoded region to file: "))) + (let ((str (buffer-substring start end))) + (with-temp-buffer + (insert (decode-base64-string str)) + (write-region-as-binary (point-min) (point-max) filename) + ))) +@end lisp +@end defmac -@defvar mime-file-decoding-method-alist +@defmac mel-define-method-function spec function -Alist of encoding vs. corresponding method to write decoded region to -file.@refill +Set @var{spec}'s function definition to @var{function}.@refill -Each element looks like @code{(STRING . FUNCTION)}. STRING is -content-transfer-encoding. FUNCTION is function to write decoded region -to file. -@end defvar +First element of @var{spec} is service.@refill + +Rest of @var{args} is like an argument list of lambda, but (car (last +@var{args})) must be specialized parameter. (car (car (last +@var{args}))) is name of variable and (nth 1 (car (last @var{args}))) is +name of backend (encoding).@refill + +Example:@refill + +@lisp +(mel-define-method-function (mime-encode-string string (nil "base64")) + 'encode-base64-string) +@end lisp +@end defmac + + + +@node generic function for mel-backend, , mel-backend, Content-Transfer-Encoding +@section How to add encoding/decoding service + +@defmac mel-define-service name &optional args doc-string + +Define @var{name} as a service for Content-Transfer-Encodings.@refill + +If @var{args} is specified, @var{name} is defined as a generic function +for the service.@refill + +Example:@refill + +@lisp +(mel-define-service encoded-text-encode-string (string encoding) + "Encode STRING as encoded-text using ENCODING. +ENCODING must be string.") +@end lisp +@end defmac @@ -751,28 +975,48 @@ FLIM $B$O$3$l$i$rId9f2=!&I|9f2=$9$k5!G=$rDs6!$7$^$9!#(B @node Header encoder/decoder, , encoded-word, encoded-word @section Header $B$NId9f2=!&I|9f2=(B -@defun eword-encode-header &optional code-conversion separator +@defun eword-decode-header &optional code-conversion separator -Decode MIME encoded-words in header fields.@refill +Header $BCf$N(B encoded-word $B$rI|9f$9$k!#(B@refill -If @var{code-conversion} is @code{nil}, 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.@refill +$B$b$7(B @var{code-conversion} $B$,(B @code{nil} $B$J$i!"(Bencoded-word $B$@$1$,I|9f$5(B +$B$l$k!#$b$7!"(B@var{code-conversion} $B$,(B MIME charset (@ref{MIME charset}) +$B$J$i!"Hs(B ASCII bit patterns $B$O$=$N(B MIME charset $B$H$7$FI|9f$5$l$k!#$3$l0J(B +$B30$N>l9g!"Hs(B ASCII bit patterns $B$O(B@code{default-mime-charset}. $B$H$7$FI|(B +$B9f$5$l$k!#(B(cf. @ref{entity formatting}) @refill -If @var{separator} is not nil, it is used as header separator. +$B$b$7(B @var{separator} $B$,(B @code{nil} $B$G$J$1$l$P!"$=$NCM$,(Bheader separator +$B$H$7$FMQ$$$i$l$k!#(B @end defun @defun eword-encode-header &optional code-conversion -Encode header fields to network representation, such as MIME -encoded-word.@refill +Header $B$r(B network $BI=8=$KId9f2=$9$k!#(B@refill -It refer variable @code{eword-field-encoding-method-alist}. +$B3F(B field $B$O(B @code{eword-field-encoding-method-alist} $B$G;XDj$5$l$?J}<0$G(B +$BId9f2=$5$l$k!#(B @end defun +@defvar eword-field-encoding-method-alist + +Association list to specify field encoding method. Each element looks +like (FIELD . METHOD).@refill + +If METHOD is @code{mime}, the FIELD will be encoded into MIME format +(encoded-word).@refill + +If METHOD is @code{nil}, the FIELD will not be encoded.@refill + +If METHOD is a MIME charset, the FIELD will be encoded as the charset +when it must be convert into network-code.@refill + +Otherwise the FIELD will be encoded as variable +@code{default-mime-charset} when it must be convert into network-code. +@end defvar + + @node custom, Appendix, encoded-word, Top @chapter $B0lHL@_Dj(B @@ -785,15 +1029,6 @@ MIME $B4XO"5!G=$K4X$9$k(B group.@refill @end deffn -@defvar default-mime-charset - -$BE,@Z$J(B MIME charset (@ref{MIME charset}) $B$,8+$D$+$i$J$+$C$?>l9g$KMQ$$$i(B -$B$l$k(BMIME charset.@refill - -$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B -@end defvar - - @defvar mime-temp-directory MIME $B5!G=$K4X$9$ke$N9T$,4^$^$l$k2DG=@-$N(B encode$B$9$kI,MQ$,$"$k!#(B -@node 8bit, Base64, 7bit, Glossary +@node 8bit, ASCII, 7bit, Glossary @subsection 8bit @cindex binary @@ -908,23 +1143,7 @@ data $B$O(B @strong{binary} (@ref{binary}) $B$H8F$V$3$H$K$9$k!#(B@refill $B$"$k!#(B -@node Base64, ASCII, 8bit, Glossary -@subsection Base64 -@cindex pad - -RFC 2045 (@ref{RFC 2045}) $B$GDj5A$5$l$F$$$k(B MIME (@ref{MIME}) $B$K$*$1$k(B -binary data (@ref{binary}) $B$N(B network $B$G$NJQ49K!$N#1$D!#(B@refill - -$B!X(B64 $B?J?t!Y$H$$$&0UL#$G!"(B3 byte $B$N(B data $B$r(B 0 $B$+$i(B 63 $B$N?t$rI=$9(B ASCII -(@ref{ASCII}) 4 $BJ8;z$KJQ49$9$kJ}K!!#!J$b$7!"(B4 $BJ8;z$K$J$i$J$1$l$P(B -@strong{pad} $B$H8F$P$l$k5M$aJ*$r$7$FD9$5$rD4@0$9$k!K(B@refill - -$B$3$N(B 65 $Bl9g$G$b0BA4$KE>Aw$G$-$k$h$&$K@_7W$5(B -$B$l$F$$$k!#(B - - -@node ASCII, Coded character set, Base64, Glossary +@node ASCII, Base64, 8bit, Glossary @subsection ASCII @cindex ANSI X3.4:1986 @cindex ASCII @@ -942,13 +1161,23 @@ Interchange'', ANSI X3.4:1986. -@node Coded character set, binary, ASCII, Glossary -@subsection Coded character set$B!JId9f2=J8;z=89g!K(B, Character code$B!JJ8;zId9f!K(B +@node Base64, binary, ASCII, Glossary +@subsection Base64 +@cindex pad -$BJ8;z$H(B byte $BNs$H#1BP#1$KBP1~IU$1$k[#Kf$G$J$$5,B'$N=89g!#(B +RFC 2045 (@ref{RFC 2045}) $B$GDj5A$5$l$F$$$k(B MIME (@ref{MIME}) $B$K$*$1$k(B +binary data (@ref{binary}) $B$N(B network $B$G$NJQ49K!$N#1$D!#(B@refill + +$B!X(B64 $B?J?t!Y$H$$$&0UL#$G!"(B3 byte $B$N(B data $B$r(B 0 $B$+$i(B 63 $B$N?t$rI=$9(B ASCII +(@ref{ASCII}) 4 $BJ8;z$KJQ49$9$kJ}K!!#!J$b$7!"(B4 $BJ8;z$K$J$i$J$1$l$P(B +@strong{pad} $B$H8F$P$l$k5M$aJ*$r$7$FD9$5$rD4@0$9$k!K(B@refill + +$B$3$N(B 65 $Bl9g$G$b0BA4$KE>Aw$G$-$k$h$&$K@_7W$5(B +$B$l$F$$$k!#(B -@node binary, media-type, Coded character set, Glossary +@node binary, Coded character set, Base64, Glossary @subsection binary @cindex binary data @cindex binary @@ -965,7 +1194,13 @@ Interchange'', ANSI X3.4:1986. $B$H$,$"$k!#(B -@node media-type, message, binary, Glossary +@node Coded character set, media-type, binary, Glossary +@subsection Coded character set$B!JId9f2=J8;z=89g!K(B, Character code$B!JJ8;zId9f!K(B + +$BJ8;z$H(B byte $BNs$H#1BP#1$KBP1~IU$1$k[#Kf$G$J$$5,B'$N=89g!#(B + + +@node media-type, message, Coded character set, Glossary @subsection media-type @cindex x-token @cindex primary-type/subtype @@ -982,7 +1217,7 @@ Interchange'', ANSI X3.4:1986. MIME (@ref{MIME}) $B$K$*$1$k(B entity (@ref{entity}) $B$Nl9g$O86B'$H$7$F(B @strong{us-ascii} $B$,;H$o$l$k!#(B@refill @@ -1330,7 +1565,7 @@ CVS $B$rMQ$$$?3+H/$K;22C$7$?$$J}$O(B @node History, , CVS, Appendix @section $BNr;K(B -FLIM $B$N(B code $B$N:G8E$NItJ,$O(B $B1]JB(B $B;LCR(B $B;a$,=q$$$?(B @file{mime.el}$B$K5/8;$7(B +FLIM $B$N(B code $B$N:G8E$NItJ,$O(B $B1]JB(B $B;LCR(B $B;a$,=q$$$?(B @file{mime.el} $B$K5/8;$7(B $B$^$9!#$3$N>.$5$J(B program $B$O(B Nemacs $B$GF0:n$9$k(B iso-2022-jp $B$N(B B-encoding $B@lMQ$N(B encoded-word $B$NI|9f2=%W%m%0%i%`$G$7$?!#(B@refill @@ -1374,7 +1609,7 @@ tm $B$G$O8e$K!"A0$,(B FLIM$B$H$J$j$^$9!#(B@refill +package $B$NL>A0$,(B FLIM $B$H$J$j$^$9!#(B@refill $B$3$ND>A0$+$iEDCf(B $BE/(B $B;a$,$h$j(B RFC $B$KCi