(let* ((field-name (make-string (1- start-column) ?X))
(field-body (ew-lf-crlf-to-crlf string))
(ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
- (decoded (ew-decode-field field-name field-body
- (if must-unfold 'ew-cut-cr-lf))))
+ (decoded (ew-decode-field field-name field-body)))
(unless (equal field-body decoded)
(setq decoded (ew-crlf-refold decoded start-column max-column)))
(ew-crlf-to-lf decoded)))
decode the charset included in it, it is not decoded."
(rotate-memo args-eword-decode-and-unfold-structured-field (list string))
(let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
- (decoded (ew-decode-field ""
- (ew-lf-crlf-to-crlf string)
- 'ew-cut-cr-lf)))
- (ew-cut-cr-lf decoded)))
+ (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
+ (ew-crlf-to-lf (ew-crlf-unfold decoded))))
(defun eword-decode-structured-field-body (string &optional must-unfold
start-column max-column)
(rotate-memo args-eword-decode-structured-field-body
(list string must-unfold start-column max-column))
(if start-column
- ;; fold with max-column (folding is not implemented.)
- (let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
- (decoded (ew-decode-field (make-string (1- start-column) ?X)
- (ew-lf-crlf-to-crlf string)
- (if must-unfold 'ew-cut-cr-lf))))
- (if must-unfold (ew-cut-cr-lf decoded) (ew-crlf-to-lf decoded)))
+ ;; fold with max-column
+ (eword-decode-and-fold-structured-field
+ string start-column max-column must-unfold)
;; Don't fold
(let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
- (decoded (ew-decode-field ""
- (ew-lf-crlf-to-crlf string)
- (if must-unfold 'ew-cut-cr-lf))))
- (if must-unfold (ew-cut-cr-lf decoded) (ew-crlf-to-lf decoded)))))
+ (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
+ (ew-crlf-to-lf decoded))))
(defun eword-decode-unstructured-field-body (string &optional must-unfold)
"Decode non us-ascii characters in STRING as unstructured field body.
such as a version of Net$cape)."
(rotate-memo args-eword-decode-unstructured-field-body
(list string must-unfold))
- (let ((decoded (ew-decode-field ""
- (ew-lf-crlf-to-crlf string)
- (if must-unfold 'ew-cut-cr-lf))))
- (if must-unfold (ew-cut-cr-lf decoded) (ew-crlf-to-lf decoded))))
+ (let ((decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
+ (ew-crlf-to-lf (ew-crlf-unfold decoded))))
(defun eword-extract-address-components (string)
"Extract full name and canonical address from STRING.