From: morioka Date: Mon, 2 Mar 1998 13:32:40 +0000 (+0000) Subject: tm 4.7.1. X-Git-Tag: tm4_7_1~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=029ed8d2d97a5e702b20ec21b586ebac7df784f7;p=elisp%2Ftm.git tm 4.7.1. --- diff --git a/Makefile b/Makefile index 5d7368e..19700ea 100644 --- a/Makefile +++ b/Makefile @@ -5,22 +5,26 @@ CFLAGS = -O UTILS = ol2 decode-b METHODS = tm-au tm-file tm-image tm-latex tm-mpeg OLFILES = README-jp.ol tiny-mime-jp.ol tm-body-jp.ol \ - tm-mh-e-jp.ol tm-gnus-jp.ol signature-jp.ol + tm-mh-e-jp.ol tm-gnus-jp.ol signature-jp.ol \ + README-eng.ol tiny-mime-eng.ol tm-body-eng.ol \ + tm-mh-e-eng.ol tm-gnus-eng.ol TEXFILES= README-jp.tex tiny-mime-jp.tex tm-body-jp.tex \ tm-mh-e-jp.tex tm-gnus-jp.tex \ - README-eng.tex tm-body-eng.tex \ - tm-mh-e-eng.tex tm-gnus-eng.tex signature-jp.tex + README-eng.tex tiny-mime-eng.tex tm-body-eng.tex \ + tm-mh-e-eng.tex tm-gnus-eng.tex DVIFILES= README-jp.dvi tiny-mime-jp.dvi tm-body-jp.dvi \ tm-mh-e-jp.dvi tm-gnus-jp.dvi \ - README-eng.dvi tm-body-eng.dvi \ - tm-mh-e-eng.dvi tm-gnus-eng.dvi signature-jp.dvi + README-eng.dvi tiny-mime-eng.dvi tm-body-eng.dvi \ + tm-mh-e-eng.dvi tm-gnus-eng.dvi PSFILES = README-jp.ps tiny-mime-jp.ps tm-body-jp.ps \ - tm-mh-e-jp.ps tm-gnus-jp.ps signature-jp.ps + tm-mh-e-jp.ps tm-gnus-jp.ps signature-jp.ps \ + README-eng.ps tiny-mime-eng.ps tm-body-eng.ps \ + tm-mh-e-eng.ps tm-gnus-eng.ps GOMI = *.aux *.log *.tex $(DVIFILES) *.ps $(UTILS) FILES = *.ol Makefile *.el *.c methods $(TEXFILES) -TARFILE = tm4.7.tar +TARFILE = tm4.7.1.tar .SUFFIXES: .ol .tex .dvi .ps diff --git a/tiny-mime-eng.ol b/tiny-mime-eng.ol new file mode 100644 index 0000000..47421ab --- /dev/null +++ b/tiny-mime-eng.ol @@ -0,0 +1,104 @@ +[[R +\title{tiny-mime manual (English Version)} +\author{Morioka Tomohiko} +\date{1994/8/4} +\maketitle +]]R + +* Overview + + tiny-mime is a multilingual MIME style message header +encoder/decoder based on RFC 1522 for Mule, NEmacs, and NEpoch. I +modified Mr.Enami's ISO-2022-JP Base64 MIME header decoder and make +it. Mr.Enami's program can decode only ISO-2022-JP Base64 header. But, +current tiny-mime has following functions: + + - unfolding at decoding + - encoding/decoding multilingual character sets, such as, + ISO-2022-JP, ISO-2022-JP-2, ISO-2022-CN, ISO-2022-KR, ISO-8859-*, + US-ASCII, EUC-KR + - B and Q-encoding + + +* character set and encoding + +** Mule + + Mule can use multilingual text, so in Mule, tiny-mime supports +ISO-2022-JP, ISO-2022-JP-2, US-ASCII, ISO-8859-1..9, ISO-2022-CN, +ISO-2022-KR, EUC-KR, et al. + + Additionally, you can add or change encoding/decoding for character +sets by function mime/set-charset-and-encoding. + +** NEmacs and NEpoch + + NEmacs can use Japanese and English only, so in NEmacs, tiny-mime +supports encoding/decoding only ISO-2022-JP and US-ASCII. + + And decoding ISO-8859-* encoded-words if they includes only ASCII. + + +* How to use tiny-mime.el (simple way) + +** decoding + + Please load tiny-mime.el, and do following command on the buffer +which you want to decode. + + M-x mime/decode-message-header + + And you can decode region by + + M-x mime/decode-region + +** encoding + + Please load tiny-mime.el, and do following command on the buffer +which you want to encode. + + M-x mime/encode-message-header + + + +* variables + +** mime/no-encoding-header-fields + + You can specify list of fields which you don't want to +encode. Default value is ("X-Nsubject"). + +example: don't encode Subject and X-Nsubject fields + +[[E +---------------------------------------------------------------------- +(setq mime/no-encoding-header-fields '("X-Nsubject" "Subject")) +---------------------------------------------------------------------- +]]E + + +* How to add or change character sets + + In Mule, you can add or change character sets by function +mime/set-charset-and-encoding. + + Function: mime/set-charset-and-encoding lc cs charset encoding + + lc: leading-char + cs: coding-system. Please specify nil if you don't want to use + coding-system for 1 octet character. + charset: MIME character set + encoding: encoding method for encoder + + +example 1: encode EUC-KR B encoding for KS C5601-1987 characters + + (mime/set-charset-and-encoding lc-kr *euc-kr* "EUC-KR" "B") + + +example 2: encode/decode koi8-r Q encoding + + (mime/set-charset-and-encoding lc-prv11 nil "KOI8-R" "Q") + +[WARNING] In this version, handling for private character is very ad +hoc. (^_^; I want to improve. diff --git a/tiny-mime-eng.tex b/tiny-mime-eng.tex new file mode 100644 index 0000000..2fbb020 --- /dev/null +++ b/tiny-mime-eng.tex @@ -0,0 +1,158 @@ +\documentstyle[a4j]{jarticle} +\setcounter{secnumdepth}{6} +\setcounter{tocdepth}{6} +\topsep=0.1cm +\parsep=0.1cm +\itemsep=0.0cm +\begin{document} +\title{tiny-mime manual (English Version)} +\author{Morioka Tomohiko} +\date{1994/8/4} +\maketitle +\medskip + +\section{Overview} +\medskip +\par +tiny-mime is a multilingual MIME style message header +encoder/decoder based on RFC 1522 for Mule, NEmacs, and NEpoch. I +modified Mr.Enami's ISO-2022-JP Base64 MIME header decoder and make +it. Mr.Enami's program can decode only ISO-2022-JP Base64 header. But, +current tiny-mime has following functions: +\medskip +\begin{itemize} +\item unfolding at decoding +\item encoding/decoding multilingual character sets, such as, +ISO-2022-JP, ISO-2022-JP-2, ISO-2022-CN, ISO-2022-KR, ISO-8859-*, +US-ASCII, EUC-KR +\item B and Q-encoding +\medskip +\medskip +\end{itemize} + +\section{character set and encoding} +\medskip + +\subsection{Mule} +\medskip +\par +Mule can use multilingual text, so in Mule, tiny-mime supports +ISO-2022-JP, ISO-2022-JP-2, US-ASCII, ISO-8859-1..9, ISO-2022-CN, +ISO-2022-KR, EUC-KR, et al. +\medskip +\par +Additionally, you can add or change encoding/decoding for character +sets by function mime/set-charset-and-encoding. +\medskip + +\subsection{NEmacs and NEpoch} +\medskip +\par +NEmacs can use Japanese and English only, so in NEmacs, tiny-mime +supports encoding/decoding only ISO-2022-JP and US-ASCII. +\medskip +\par +And decoding ISO-8859-* encoded-words if they includes only ASCII. +\medskip +\medskip + +\section{How to use tiny-mime.el (simple way)} +\medskip + +\subsection{decoding} +\medskip +{\baselineskip=10pt +\begin{verbatim} + Please load tiny-mime.el, and do following command on the buffer +which you want to decode. +\end{verbatim}} +\medskip +{\list{}{\leftmargin=8ex}\item[] +\par +M-x mime/decode-message-header +\endlist} +\medskip +{\baselineskip=10pt +\begin{verbatim} + And you can decode region by +\end{verbatim}} +\medskip +{\baselineskip=10pt +\begin{verbatim} + M-x mime/decode-region +\end{verbatim}} +\medskip + +\subsection{encoding} +\medskip +{\baselineskip=10pt +\begin{verbatim} + Please load tiny-mime.el, and do following command on the buffer +which you want to encode. +\end{verbatim}} +\medskip +{\list{}{\leftmargin=8ex}\item[] +\par +M-x mime/encode-message-header +\endlist} +\medskip +\medskip +\medskip + +\section{variables} +\medskip + +\subsection{mime/no-encoding-header-fields} +\medskip +\par +You can specify list of fields which you don't want to +encode. Default value is ("X-Nsubject"). +\medskip +\begin{description} +\item[example:]don't encode Subject and X-Nsubject fields +\medskip +\end{description} +{\baselineskip=10pt +\begin{verbatim} +---------------------------------------------------------------------- +(setq mime/no-encoding-header-fields '("X-Nsubject" "Subject")) +---------------------------------------------------------------------- +\end{verbatim}} +\medskip +\medskip + +\section{How to add or change character sets} +\medskip +\par +In Mule, you can add or change character sets by function +mime/set-charset-and-encoding. +\medskip +\begin{description} +\item[Function:]mime/set-charset-and-encoding lc cs charset encoding +\medskip +\begin{description} +\item[lc:]leading-char +\item[cs:]coding-system. Please specify nil if you don't want to use +coding-system for 1 octet character. +\item[charset:]MIME character set +\item[encoding:]encoding method for encoder +\medskip +\medskip +\end{description} +\end{description} +\begin{description} +\item[example 1:]encode EUC-KR B encoding for KS C5601-1987 characters +\medskip +\par +(mime/set-charset-and-encoding lc-kr *euc-kr* "EUC-KR" "B") +\medskip +\medskip +\item[example 2:]encode/decode koi8-r Q encoding +\medskip +\par +(mime/set-charset-and-encoding lc-prv11 nil "KOI8-R" "Q") +\medskip +\item[{[}WARNING{]}]In this version, handling for private character is very ad +hoc. (\verb+^+\_\verb+^+; I want to improve. +\end{description} +\end{document} diff --git a/tl-header.el b/tl-header.el index 262ba1c..b40bea9 100644 --- a/tl-header.el +++ b/tl-header.el @@ -1,12 +1,12 @@ ;;; -;;; $Id: tl-header.el,v 4.2 1994/08/03 04:39:55 morioka Exp $ +;;; $Id: tl-header.el,v 4.3 1994/08/04 00:54:26 morioka Exp $ ;;; (provide 'tl-header) (defconst message/quoted-string-regexp "\".*\"") (defconst message/field-name-regexp "^[!-9;-~]+:") -(defconst message/field-body-regexp ".*\\(\n[ \t]+.*\\)*") +(defconst message/field-body-regexp ".*\\(\n[ \t].*\\)*") (defconst message/field-regexp (concat message/field-name-regexp message/field-body-regexp))