-1998-04-25 Tanaka Akira <shuhei-k@jaist.ac.jp>
+1998-04-25 Tanaka Akira <akr@jaist.ac.jp>
+
+ * eword-decode.el (eword-decode-first-encoded-words): Update DOC-string.
+ (eword-decode-first-encoded-words): Update DOC-string.
+ (eword-decode-unstructured): Argument `code-conversion' is now required.
+ (eword-decode-comment): Argument `code-conversion' is now required.
+ (eword-decode-quoted-string): Argument `code-conversion' is now
+ required.
+ (eword-decode-string): Update DOC-string. Reorder arguments to calling
+ `eword-decode-unstructured'.
+ (eword-decode-region): Update DOC-string. Reorder arguments to calling
+ `eword-decode-unstructured'.
+ (eword-analyze-quoted-string): Add `default-mime-charset' argument to
+ calling eword-decode-quoted-string.
+ (eword-analyze-comment): Add `default-mime-charset' argument to
+ calling eword-decode-comment.
+
+1998-04-25 Tanaka Akira <akr@jaist.ac.jp>
* eword-decode.el (eword-decode-entire-string): Delete argument
`default-charset'. Add argument `code-conversion'.
eword-after-encoded-word-in-comment-regexp or
eword-after-encoded-word-in-quoted-string-regexp.
-If beginning of STRING matches EWORD-REGEXP and AFTER-REGEXP,
+If beginning of STRING matches EWORD-REGEXP with AFTER-REGEXP,
returns a cons cell of decoded string(sequence of characters) and
the rest(sequence of octets).
;;; @ for string
;;;
-(defun eword-decode-unstructured (string &optional must-unfold code-conversion)
+(defun eword-decode-unstructured (string code-conversion &optional must-unfold)
(eword-decode-entire-string
string
eword-encoded-word-in-unstructured-regexp
must-unfold
code-conversion))
-(defun eword-decode-comment (string &optional must-unfold code-conversion)
+(defun eword-decode-comment (string code-conversion &optional must-unfold)
(eword-decode-entire-string
string
eword-encoded-word-in-comment-regexp
must-unfold
code-conversion))
-(defun eword-decode-quoted-string (string &optional must-unfold code-conversion)
+(defun eword-decode-quoted-string (string code-conversion &optional must-unfold)
(eword-decode-entire-string
string
eword-encoded-word-in-quoted-string-regexp
If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
+such as a version of Net$cape).
+
+If CODE-CONVERSION is 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."
(eword-decode-unstructured
+ code-conversion
(std11-unfold-string string)
- must-unfold
- code-conversion))
+ must-unfold))
;;; @ for region
If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
+such as a version of Net$cape).
+
+If CODE-CONVERSION is 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."
(interactive "*r")
(save-excursion
(save-restriction
(eword-decode-unfold)
)
(let ((str (eword-decode-unstructured
+ code-conversion
(buffer-substring (point-min) (point-max))
- must-unfold
- code-conversion)))
+ must-unfold)))
(delete-region (point-min) (point-max))
(insert str)))))
(let ((p (std11-check-enclosure string ?\" ?\")))
(if p
(cons (cons 'quoted-string
- (eword-decode-quoted-string (substring string 0 p)))
+ (eword-decode-quoted-string
+ (substring string 0 p)
+ default-mime-charset))
(substring string p))
)))
(setq p (std11-check-enclosure string ?\( ?\) t p)))
(setq p (or p len))
(cons (cons 'comment
- (eword-decode-comment (substring string 0 p)))
+ (eword-decode-comment
+ (substring string 0 p)
+ default-mime-charset))
(substring string p)))
nil)))