mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Add work-around for nnmaildir encoding problem
* lisp/gnus/mm-decode.el (mm-with-part): Fix problem with multipart 8bit encoded posts from nnmaildir (bug#44307).
This commit is contained in:
parent
7e80aecc24
commit
23a887e426
2 changed files with 31 additions and 6 deletions
|
|
@ -54,7 +54,7 @@
|
|||
'charset)))
|
||||
"<!doctype html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body>ääää</body></html>\n")))))))
|
||||
|
||||
(ert-deftest test-mm-with-part ()
|
||||
(ert-deftest test-mm-with-part-unibyte ()
|
||||
(with-temp-buffer
|
||||
(set-buffer-multibyte nil)
|
||||
(insert-file-contents-literally (ert-resource-file "8bit-multipart.bin"))
|
||||
|
|
@ -70,4 +70,20 @@
|
|||
'charset)))
|
||||
"ääää\n"))))))
|
||||
|
||||
(ert-deftest test-mm-with-part-multibyte ()
|
||||
(with-temp-buffer
|
||||
(set-buffer-multibyte t)
|
||||
(nnheader-insert-file-contents (ert-resource-file "8bit-multipart.bin"))
|
||||
(while (search-forward "\r\n" nil t)
|
||||
(replace-match "\n"))
|
||||
(let ((handle (mm-dissect-buffer)))
|
||||
(pop handle)
|
||||
(let ((part (pop handle)))
|
||||
(should (equal (decode-coding-string
|
||||
(mm-with-part part
|
||||
(buffer-string))
|
||||
(intern (mail-content-type-get (mm-handle-type part)
|
||||
'charset)))
|
||||
"ääää\n"))))))
|
||||
|
||||
;;; mm-decode-tests.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue