+2000-11-03 Simon Josefsson <sj@extundo.com>
+
+ * rfc2231.el (rfc2231-parse-qp-string): New function.
+ (require): rfc2047.
+
+ * mail-parse.el (mail-header-parse-content-type):
+ (mail-header-parse-content-disposition): Support invalid QP
+ encoded strings, by using `rfc2231-parse-qp-string'.
+
2000-11-03 08:58:08 ShengHuo ZHU <zsh@cs.rochester.edu>
* rfc2231.el (rfc2231-parse-string): Decode when there is no number.
(require 'rfc2047)
(require 'rfc2045)
-(defalias 'mail-header-parse-content-type 'rfc2231-parse-string)
-(defalias 'mail-header-parse-content-disposition 'rfc2231-parse-string)
+(defalias 'mail-header-parse-content-type 'rfc2231-parse-qp-string)
+(defalias 'mail-header-parse-content-disposition 'rfc2231-parse-qp-string)
(defalias 'mail-content-type-get 'rfc2231-get-value)
;(defalias 'mail-header-encode-parameter 'rfc2045-encode-string)
(defalias 'mail-header-encode-parameter 'rfc2231-encode-string)
(eval-when-compile (require 'cl))
(require 'ietf-drums)
+(require 'rfc2047)
(defun rfc2231-get-value (ct attribute)
"Return the value of ATTRIBUTE from CT."
(cdr (assq attribute (cdr ct))))
+(defun rfc2231-parse-qp-string (string)
+ "Parse QP-encoded string using `rfc2231-parse-string'.
+N.B. This is in violation with RFC2047, but it seem to be in common use."
+ (rfc2231-parse-string (rfc2047-decode-string string)))
+
(defun rfc2231-parse-string (string)
"Parse STRING and return a list.
The list will be on the form