2 (require 'eword-decode)
5 (eval-when-compile (require 'cl))
7 (defun ew-gnus-structured-field-decoder (string)
8 (if (fboundp 'ew-decode-field)
9 (let ((ew-ignore-76bytes-limit t)
10 (ew-default-mime-charset default-mime-charset))
12 (ew-cut-cr-lf (ew-decode-field "From" (ew-lf-crlf-to-crlf string)))
14 (message "gnus-structured-field-decoder error: %s" string)
15 (decode-mime-charset-string string 'x-ctext))))
16 (eword-decode-and-unfold-structured-field-body string)))
18 (defun ew-gnus-unstructured-field-decoder (string)
19 (if (fboundp 'ew-decode-field)
20 (let ((ew-ignore-76bytes-limit t)
21 (ew-default-mime-charset default-mime-charset))
23 (ew-cut-cr-lf (ew-decode-field "Subject" (ew-lf-crlf-to-crlf string)))
25 (message "gnus-unstructured-field-decoder error: %s" string)
26 (decode-mime-charset-string string 'x-ctext))))
27 (eword-decode-unstructured-field-body (std11-unfold-string string) 'must-unfold)))