2 (require 'eword-decode)
4 (defun ew-gnus-structured-field-decoder (string)
5 (if (fboundp 'ew-decode-field)
6 (let ((ew-ignore-76bytes-limit t)
7 (ew-default-mime-charset default-mime-charset))
9 (ew-cut-cr-lf (ew-decode-field "From" (ew-lf-crlf-to-crlf string)))
11 (message "gnus-structured-field-decoder error: %s" string)
12 (decode-mime-charset-string string 'x-ctext))))
13 (eword-decode-and-unfold-structured-field string)))
15 (defun ew-gnus-unstructured-field-decoder (string)
16 (if (fboundp 'ew-decode-field)
17 (let ((ew-ignore-76bytes-limit t)
18 (ew-default-mime-charset default-mime-charset))
20 (ew-cut-cr-lf (ew-decode-field "Subject" (ew-lf-crlf-to-crlf string)))
22 (message "gnus-unstructured-field-decoder error: %s" string)
23 (decode-mime-charset-string string 'x-ctext))))
24 (eword-decode-unstructured-field-body (std11-unfold-string string) 'must-unfold)))