From: akr Date: Thu, 27 Aug 1998 16:36:24 +0000 (+0000) Subject: * ew-dec.el (ew-decode-field-test): Support X-Git-Tag: doodle-1_9_2~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5100d4eecb05491e10eb411c164e5d27841213ed;p=elisp%2Fflim.git * ew-dec.el (ew-decode-field-test): Support `ew-permit-null-encoded-text'. * ew-unit.el (ew-decode-eword): Check `ew-permit-null-encoded-text'. * ew-var.el (ew-encoded-text-regexp): Always permit null string regardless of `ew-permit-null-encoded-text'. --- diff --git a/ChangeLog b/ChangeLog index 2fc87e5..aa41a90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 1998-08-27 Tanaka Akira + * ew-dec.el (ew-decode-field-test): Support + `ew-permit-null-encoded-text'. + + * ew-unit.el (ew-decode-eword): Check + `ew-permit-null-encoded-text'. + + * ew-var.el (ew-encoded-text-regexp): Always permit null string + regardless of `ew-permit-null-encoded-text'. + +1998-08-27 Tanaka Akira + * ew-var.el (ew-decode-field-syntax-alist): Add few fields. * eword-decode.el (eword-decode-header): Compare decoded result diff --git a/ew-dec.el b/ew-dec.el index 4c2675c..759c7d8 100644 --- a/ew-dec.el +++ b/ew-dec.el @@ -490,11 +490,13 @@ each line is separated by CRLF." (ew-ignore-76bytes-limit nil) (ew-permit-sticked-comment nil) (ew-permit-sticked-special nil) + (ew-permit-null-encoded-text nil) (options '(ew-ignore-76bytes-limit ew-ignore-75bytes-limit ew-permit-sticked-special ew-permit-sticked-comment + ew-permit-null-encoded-text ew-decode-sticked-encoded-word ew-decode-quoted-encoded-word )) diff --git a/ew-unit.el b/ew-unit.el index 569c1ac..e780853 100644 --- a/ew-unit.el +++ b/ew-unit.el @@ -25,13 +25,16 @@ bdec cdec bcheck tmp) - (if (and (setq bdec (ew-byte-decoder encoding)) - (setq cdec (ew-char-decoder charset))) - (if (or (null (setq bcheck (ew-byte-checker encoding))) - (funcall bcheck encoding encoded-text)) - (ew-quote (closure-call cdec (funcall bdec encoded-text))) - (ew-quote str)) - (ew-quote-eword charset encoding encoded-text))) + (if (or ew-permit-null-encoded-text + (< 0 (length encoded-text))) + (if (and (setq bdec (ew-byte-decoder encoding)) + (setq cdec (ew-char-decoder charset))) + (if (or (null (setq bcheck (ew-byte-checker encoding))) + (funcall bcheck encoding encoded-text)) + (ew-quote (closure-call cdec (funcall bdec encoded-text))) + (ew-quote str)) + (ew-quote-eword charset encoding encoded-text)) + (ew-quote str))) (ew-quote str))) (defun ew-byte-decoder (encoding) diff --git a/ew-var.el b/ew-var.el index 9a3e485..2463626 100644 --- a/ew-var.el +++ b/ew-var.el @@ -8,7 +8,7 @@ (defvar ew-ignore-76bytes-limit nil) (defvar ew-permit-sticked-comment nil) (defvar ew-permit-sticked-special nil) -(defvar ew-permit-null-encoded-text nil) ; affect when loading time. +(defvar ew-permit-null-encoded-text nil) (defvar ew-remove-bare-crlf nil) (defvar ew-default-mime-charset 'x-ctext) @@ -123,10 +123,7 @@ ;;; constants. (defconst ew-token-regexp "[-!#-'*+0-9A-Z^-~]+") -(defconst ew-encoded-text-regexp - (if ew-permit-null-encoded-text - "[!->@-~]*" - "[!->@-~]+")) +(defconst ew-encoded-text-regexp "[!->@-~]*") (defconst ew-encoded-word-regexp (concat (regexp-quote "=?")