`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 <akr@jaist.ac.jp>
+ * 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 <akr@jaist.ac.jp>
+
* ew-var.el (ew-decode-field-syntax-alist): Add few fields.
* eword-decode.el (eword-decode-header): Compare decoded result
(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
))
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)
(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)
;;; 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 "=?")