;;; test driver
-(setq decode-test 'decode-flam)
-(setq encode-test 'encode-flam)
+;;; FLIM or FLAM
+'(progn
+(require 'mime)
+(require 'ew-line)
+
+(if (< max-specpdl-size 1000)
+ (setq max-specpdl-size 1000))
+
+(defun decode-test (src dsts &rest opts)
+ (setq src (ew-crlf-to-lf src))
+ (setq eword-lexical-analyze-cache nil)
+ (setq eword-decode-sticked-encoded-word
+ (or (memq 'permit-sticked-comment opts)
+ (memq 'permit-sticked-special opts)))
+ (setq eword-decode-quoted-encoded-word nil)
+ (with-temp-buffer
+ (insert src "\n" mail-header-separator)
+ (eword-decode-header 'us-ascii mail-header-separator)
+ (goto-char (point-min))
+ (std11-narrow-to-header mail-header-separator)
+ (std11-field-end)
+ (let ((result (std11-unfold-string
+ (buffer-substring (point-min) (point)))))
+ (if (member result dsts) t result))))
+
+(defun encode-test (src dsts &rest opts)
+ (setq eword-lexical-analyze-cache nil)
+ (setq eword-decode-sticked-encoded-word nil)
+ (setq eword-decode-quoted-encoded-word nil)
+ (with-temp-buffer
+ (insert src "\n" mail-header-separator)
+ (goto-char (point-min))
+ (eword-encode-header 'us-ascii)
+ (goto-char (point-min))
+ (std11-narrow-to-header mail-header-separator)
+ (std11-field-end)
+ (let ((result (buffer-substring (point-min) (point))))
+ (if (member result dsts) t result))))
+)
+
+;;; EW
+(progn
+(require 'ew-dec)
+(require 'ew-line)
+
+(defun decode-test (src dsts &rest opts)
+ (let ((ew-decode-quoted-encoded-word nil)
+ (ew-ignore-75bytes-limit (memq 'ignore-75bytes-limit opts))
+ (ew-ignore-76bytes-limit (memq 'ignore-76bytes-limit opts))
+ (ew-permit-sticked-comment (memq 'permit-sticked-comment opts))
+ (ew-permit-sticked-special (memq 'permit-sticked-special opts)))
+ (string-match "\\`[^:]*:" src)
+ (let* ((field-name (substring src
+ (match-beginning 0)
+ (1- (match-end 0))))
+ (field-body (substring src (match-end 0)))
+ (result (ew-crlf-unfold
+ (concat field-name ":"
+ (ew-decode-field field-name field-body)))))
+ (if (member result dsts) t result))))
+
+(defun encode-test (src dsts &rest opts)
+ nil)
+)
+
+;;;
(setq decode-succ-count 0)
(setq decode-all-count 0)
(if (stringp dsts) (setq dsts (list dsts)))
(setq decode-all-count (1+ decode-all-count))
(let ((res (condition-case nil
- (apply decode-test src dsts opts)
+ (apply 'decode-test src dsts opts)
(error nil))))
(if (eq res t)
(progn
(if (stringp dsts) (setq dsts (list dsts)))
(setq encode-all-count (1+ encode-all-count))
(let ((res (condition-case nil
- (apply encode-test src dsts opts)
+ (apply 'encode-test src dsts opts)
(error nil))))
(if (eq res t)
(progn
(+ decode-succ-count encode-succ-count)
(+ decode-all-count encode-all-count))))
-;;; FLAM specific part (FLIM is OK)
-
-(if (< max-specpdl-size 1000)
- (setq max-specpdl-size 1000))
-
-(defun decode-flam (src dsts &rest opts)
- (setq eword-lexical-analyze-cache nil)
- (setq eword-decode-sticked-encoded-word
- (or (memq 'permit-sticked-comment opts)
- (memq 'permit-sticked-special opts)))
- (setq eword-decode-quoted-encoded-word nil)
- (with-temp-buffer
- (insert src "\n" mail-header-separator)
- (eword-decode-header 'us-ascii mail-header-separator)
- (goto-char (point-min))
- (std11-narrow-to-header mail-header-separator)
- (std11-field-end)
- (let ((result (buffer-substring (point-min) (point))))
- (if (member result dsts) t result))))
-
-(defun encode-flam (src dsts &rest opts)
- (setq eword-lexical-analyze-cache nil)
- (setq eword-decode-sticked-encoded-word nil)
- (setq eword-decode-quoted-encoded-word nil)
- (with-temp-buffer
- (insert src "\n" mail-header-separator)
- (goto-char (point-min))
- (eword-encode-header 'us-ascii)
- (goto-char (point-min))
- (std11-narrow-to-header mail-header-separator)
- (std11-field-end)
- (let ((result (buffer-substring (point-min) (point))))
- (if (member result dsts) t result))))
-
;;;start-test
;;; Section 1: Decoding examples from RFC2047
"CC: Andr\e.A\eNi Pirard <PIRARD@vm1.ulg.ac.be>")\e*B
(decode
-"Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
+"Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=\r
=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?="
"Subject: If you can read this you understand the example.")
"From: Patrik F\e.A\eNdltstr\eNvm <paf@nada.kth.se>")\e*B
(decode
-"From: Nathaniel Borenstein <nsb@thumper.bellcore.com>
+"From: Nathaniel Borenstein <nsb@thumper.bellcore.com>\r
(=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)"
"From: Nathaniel Borenstein <nsb@thumper.bellcore.com> (\e.H\eNm\eNe\eNl\eNy \eNo\eNa \eNi\eNl\eNh\eNt\eNp)")\e*B
"From: foo@bar.baz (ab)")
(decode
-"From: foo@bar.baz (=?ISO-8859-1?Q?a?=
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?=\r
=?ISO-8859-1?Q?b?=)"
"From: foo@bar.baz (ab)")
"Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)")
(decode
-"Subject: (=?ISO-8859-1?Q?a?=
+"Subject: (=?ISO-8859-1?Q?a?=\r
=?ISO-8859-1?Q?b?=)"
"Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)")
"From: \e$B$"\e(B <akr@jaist.ac.jp>")
(decode
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
<akr@jaist.ac.jp>"
"From: \e$B$"$$\e(B <akr@jaist.ac.jp>")
(decode
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
<akr@jaist.ac.jp>"
"From: \e$B$"$$\e(B <akr@jaist.ac.jp>")
(decode
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
<akr@jaist.ac.jp>"
"From: \e$B$"$$\e(B <akr@jaist.ac.jp>")
"From: \e$B$"\e(B \"ja \\\"a\\\"\" <akr@jaist.ac.jp>")
(decode
-"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
=?ISO-2022-JP?B?GyhC?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
"From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)")
(decode
"From: =?US-ASCII?Q?=28?= <akr@jaist.ac.jp>, =?US-ASCII?Q?=29?= <akr@jaist.ac.jp>"
-"From: \"(\" <akr@jaist.ac.jp>, \")\" <akr@jaist.ac.jp>")
+"From: \"(\" <akr@jaist.ac.jp>, \")\" <akr@jaist.ac.jp>"
+'ignore-76bytes-limit)
(decode
"From: =?ISO-2022-JP?B?YSJiGyRCJCIbKEJjXA==?= <akr@jaist.ac.jp>"
"Subject: =?ISO-2022-JP?B??=")
(decode
-"Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= a
+"Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= a\r
=?ISO-2022-JP?B?GyRCJCQbKEI=?="
"Subject: \e$B$"\e(B a \e$B$$\e(B")
(decode
-"Subject: =?ISO-2022-JP?B?GyRCMCQbKEIgICAgICAgICAgICAgICAgICAgICAgICAgICAg?=
- =?US-ASCII?Q?____________________________________________________________?=
+"Subject: =?ISO-2022-JP?B?GyRCMCQbKEIgICAgICAgICAgICAgICAgICAgICAgICAgICAg?=\r
+ =?US-ASCII?Q?____________________________________________________________?=\r
=?ISO-2022-JP?B?ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBskQlJfGyhC?="
"Subject: \e$B0$\e(B \e$BR_\e(B")
"From:=?ISO-2022-JP?B?GyRCJCIbKEI=?= <akr@jaist.ac.jp>")
(decode
-"From: akr@jaist.ac.jp
+"From: akr@jaist.ac.jp\r
(=?ISO-2022-JP?B?GyRCJCIbKEI=?=\\a=?ISO-2022-JP?B?GyRCJCQbKEI=?=)"
"From: akr@jaist.ac.jp (\e$B$"\e(B\\a\e$B$$\e(B)")
"From: \"a\"=?ISO-2022-JP?B?GyRCJCIbKEI=?=\"b\" <akr@jaist.ac.jp>")
(decode
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r
<akr@jaist.ac.jp>"
"From: \e$B$"\e(B(\e$B$"\e(B) <akr@jaist.ac.jp>"
'permit-sticked-comment)
;;; Section 4: Decoding invalid inputs.
(decode
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?==?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?==?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
<akr@jaist.ac.jp>"
"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?==?ISO-2022-JP?B?GyRCJCQbKEI=?= <akr@jaist.ac.jp>")
(decode
-"From: akr@jaist.ac.jp
+"From: akr@jaist.ac.jp\r
(=?ISO-2022-JP?B?GyRCJCIbKEI=?=a=?ISO-2022-JP?B?GyRCJCQbKEI=?=)"
"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=a=?ISO-2022-JP?B?GyRCJCQbKEI=?=)")
(decode
-"From: akr@jaist.ac.jp
+"From: akr@jaist.ac.jp\r
(=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)")
(decode
-"From: akr@jaist.ac.jp
+"From: akr@jaist.ac.jp\r
(=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
"From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)"
'ignore-76bytes-limit)
"Subject: =?ISO-2022-JP?B?GyRCNFg-dBsoQg==?="
"Subject: =?ISO-2022-JP?B?GyRCNFg-dBsoQg==?=")
+(decode
+"Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?= =?ISO-2022-JP?B?GyRCJCIbKEI=?="
+"Subject: \e$B$"\e(B=?=\e$B$"\e(B")
+
;;; Section 5: Encoding proper inputs.
(encode
(encode
"Subject: \e$B0$\e(B \e$BR_\e(B"
-"Subject: =?ISO-2022-JP?B?GyRCMCQbKEIgICAgICAgICAgICAgICAgICAgICAgICAgICAg?=
- =?US-ASCII?Q?____________________________________________________________?=
+"Subject: =?ISO-2022-JP?B?GyRCMCQbKEIgICAgICAgICAgICAgICAgICAgICAgICAgICAg?=\r
+ =?US-ASCII?Q?____________________________________________________________?=\r
=?ISO-2022-JP?B?ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBskQlJfGyhC?=")
(encode
(encode
"From: aaaaaaaaaaaaaaaaaaaaa(\e$B$"$$\e(B)aaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIbKEI=?=
+"From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
=?ISO-2022-JP?B?GyRCJCQbKEI=?=)aaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>")
(encode
(encode
"From: aaaaaaaaaaaaaaaaaaaaa(\e$B$"$$\e(B) aaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIkJBsoQg==?=)
+"From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIkJBsoQg==?=)\r
aaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>")
(encode
"From: aaaaaaaaaaaaaaaaaaaaa(\e$B$"\e(B \e$B$$\e(B)aaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIbKEIgCg==?=
+"From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIbKEIgCg==?=\r
=?ISO-2022-JP?B?GyRCJCQbKEI=?=)aaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>")
(encode
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaa
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaa\r
<akr@jaist.ac.jp>")
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
<akr@jaist.ac.jp>")
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From:
- (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"From:\r
+ (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
<akr@jaist.ac.jp>")
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From:
- (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"From:\r
+ (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
<akr@jaist.ac.jp>")
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
'separate-sticked-tokens-for-fold)
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)=?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaa?=
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)=?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaa?=\r
=?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?= <akr@jaist.ac.jp>"
'encode-long-ascii-string-for-fold 'permit-sticked-special)
(encode
"From: (\e$B$"\e(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
aaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
'divide-atom-for-fold)
(encode
"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\e$B$"\e(B)aa <akr@jaist.ac.jp>"
-"From: =?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?=
+"From: =?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?=\r
=?US-ASCII?Q?a?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aa <akr@jaist.ac.jp>"
'encode-long-ascii-string-for-fold)
(encode
"From: \e$B$"\e(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\e$B$"\e(B)aa <akr@jaist.ac.jp>"
-"From: =?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==?=
+"From: =?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==?=\r
=?US-ASCII?Q?aaaaaaaaaaaaaaa?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aa"
'encode-long-ascii-string-for-fold)
(encode
"From: ((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B)))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From: ((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))
+"From: ((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From: (((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyRCJCIbKEI=?=)))))))))))))))))))))))))))))))))))))))))
+"From: (((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyRCJCIbKEI=?=)))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: ((((((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B)))))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From: ((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyRCJCIbKEI=?=))))))))))))))))))))))))))))))))))))))))))))))
+"From: ((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyRCJCIbKEI=?=))))))))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (((((((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B))))))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From: (((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=)))))))))))))))))))))))))))))))))))))))))))))))
+"From: (((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=)))))))))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: ((((((((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B)))))))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From:
- ((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))
+"From:\r
+ ((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: ((((((((((((((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B)))))))))))))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From:
- ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))
+"From:\r
+ ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From:
- ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))
+"From:\r
+ ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (((((((((((((((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B))))))))))))))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From:
- ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))
+"From:\r
+ ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: ((((((((((((((((((((((((((((((((((((((((((((((((((((((((\e$B$"\e(B)))))))))))))))))))))))))))))))))))))))))))))))))))))))) <akr@jaist.ac.jp>"
-"From:
- ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyhC?=((=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))=?ISO-2022-JP?B?GyhC?=
- =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))
+"From:\r
+ ((((((((((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyhC?=((=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))=?ISO-2022-JP?B?GyhC?=\r
+ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (\e$B$"\e(B)()()()()()()()()()()()()()()()()()()() <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)()()()()()()()()()()()()()()()()()()()
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)()()()()()()()()()()()()()()()()()()()\r
<akr@jaist.ac.jp>")
(encode
"From: (\e$B$"\e(B)()()()()()()()()()()()()()()()()()()()()()() <akr@jaist.ac.jp>"
-"From:
- (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)()()()()()()()()()()()()()()()()()()()()()()
+"From:\r
+ (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)()()()()()()()()()()()()()()()()()()()()()()\r
<akr@jaist.ac.jp>")
(encode
"From: (\e$B$"\e(B)()()()()()()()()()()()()()()()()()()()()()()() <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()()()()()()()()()()()()()()
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()()()()()()()()()()()()()()\r
<akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"From: (\e$B$"\e(B)()()()()()()()()()()()()()()()()()()()()()()()()()()() <akr@jaist.ac.jp>"
-"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()()()()()()(=?ISO-2022-JP?B?GyhC?=
+"From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()()()()()()(=?ISO-2022-JP?B?GyhC?=\r
=?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()() <akr@jaist.ac.jp>"
'zero-characters-encoded-word-hack)
(encode
"To: l@d (\e$B$"\e(B aaaa)(\e$B$"\e(B)"
-"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
+"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
aaaa)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)")
(encode
"To: l@d (\e$B$"\e(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(\e$B$"\e(B)"
-"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
+"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)")
(encode
"To: l@d (\e$B$"\e(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(\e$B$"\e(B)"
-"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=?=
+"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=?=\r
=?US-ASCII?Q?aaaaaaaaaaaaaaaaaa?=)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)"
'encode-long-ascii-string-for-fold)
(encode
"To: l@d (\e$B$"\e(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()\e$B$"\e(B)"
-"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=?=
+"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=?=\r
=?US-ASCII?Q?aaaaaaaaaaaaaaaaaa?=()=?ISO-2022-JP?B?GyRCJCIbKEI=?=)"
'encode-long-ascii-string-for-fold)
(encode
"To: l@d (\e$B$"\e(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \e$B$"\e(B)(\e$B$"\e(B)"
-"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
=?ISO-2022-JP?B?GyRCJCIbKEI=?=)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)")
(encode
"To: l@d (\e$B$"\e(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \e$B$"\e(B)(\e$B$"\e(B)"
-"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+"To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
=?ISO-2022-JP?B?GyRCJCIbKEI=?=)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)")
;----------------------------------------------------------------------------
(encode
"From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)"
-"From: akr@jaist.ac.jp
+"From: akr@jaist.ac.jp\r
(=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
'ignore-76bytes-limit)
(encode
"From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)"
-"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
- =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
=?ISO-2022-JP?B?GyhC?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
'zero-characters-encoded-word-hack)
(encode
"From: \e$B$"\e(B(\e$B$"\e(B) <akr@jaist.ac.jp>"
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r
<akr@jaist.ac.jp>"
'permit-sticked-comment)
(encode
"From: \e$B$"\e(B(\e$B$"\e(B) <akr@jaist.ac.jp>"
-"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r
<akr@jaist.ac.jp>"
'separate-sticked-comment)
(encode
"To: \e$B$"\e(B:\e$B$$\e(B<akr@jaist.ac.jp>;"
-"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
=?ISO-2022-JP?B?GyhC?=<akr@jaist.ac.jp>;"
'zero-characters-encoded-word-hack 'permit-sticked-special)
(encode
"To: \e$B$"\e(B:\e$B$$\e(B<akr@jaist.ac.jp>;"
-"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= : =?ISO-2022-JP?B?GyRCJCQbKEI=?=
+"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= : =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
<akr@jaist.ac.jp>;"
'separate-sticked-special)
(encode
"To: \e$B$"\e(B:\e$B$$\e(B<foo@bar>,\e$B$&\e(B<foo@bar>;,\e$B$(\e(B<foo@bar>"
-"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=
- =?ISO-2022-JP?B?GyhC?=<foo@bar>,=?ISO-2022-JP?B?GyRCJCYbKEI=?=
+"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
+ =?ISO-2022-JP?B?GyhC?=<foo@bar>,=?ISO-2022-JP?B?GyRCJCYbKEI=?=\r
=?ISO-2022-JP?B?GyhC?=<foo@bar>;,=?ISO-2022-JP?B?GyRCJCgbKEI=?=<foo@bar>"
'zero-characters-encoded-word-hack 'permit-sticked-special)
(encode
"To: \e$B$"\e(B:\e$B$$\e(B<foo@bar>,\e$B$&\e(B<foo@bar>;,\e$B$(\e(B<foo@bar>"
-"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= : =?ISO-2022-JP?B?GyRCJCQbKEI=?=
- <foo@bar>, =?ISO-2022-JP?B?GyRCJCYbKEI=?= <foo@bar>;,
+"To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= : =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r
+ <foo@bar>, =?ISO-2022-JP?B?GyRCJCYbKEI=?= <foo@bar>;,\r
=?ISO-2022-JP?B?GyRCJCgbKEI=?= <foo@bar>"
'separate-sticked-special)
'quoted-encoded-word)
(decode
-"Subject: =?ISO-2022-JP?G?H4sIAGiTszUAA5NWcVIBAhMtaQ0nAGLSaeEMAAAA?=
+"Subject: =?ISO-2022-JP?G?H4sIAGiTszUAA5NWcVIBAhMtaQ0nAGLSaeEMAAAA?=\r
=?ISO-2022-JP?G?H4sIAH6TszUAA5NWcVIxV3FTyVbxldZwAgAuIikKDgAAAA==?="
"Subject: =?+ISO-2022-JP?G?H4sIAGiTszUAA5NWcVIBAhMtaQ0nAGLSaeEMAAAA?==?+ISO-2022-JP?G?H4sIAH6TszUAA5NWcVIxV3FTyVbxldZwAgAuIikKDgAAAA==?="
'quoted-encoded-word)
'quoted-encoded-word)
(decode
-"Subject: =?Unknown-Charset?B?gqA=?=
+"Subject: =?Unknown-Charset?B?gqA=?=\r
=?Unknown-Charset?B?gqA=?="
"Subject: =?+Unknown-Charset?B?gqA=?==?+Unknown-Charset?B?gqA=?="
'quoted-encoded-word)
(decode
-"Subject: =?Unknown-Charset?B?gqA=?=
+"Subject: =?Unknown-Charset?B?gqA=?=\r
=?Unknown-Charset?B?gqA=?="
"Subject: =?+Unknown-Charset?B?gqA=?==?+Unknown-Charset?B?gqA=?="
'quoted-encoded-word)
(decode
"Subject: =?US-ASCII?Q?a=0D=0A_b?="
-"Subject: a=?+US-ASCII?Q?=0D=0A?= b"
+"Subject: a b"
'quoted-encoded-word)
(decode