- flag-ew eword-decode-sticked-encoded-word))
- (t (error "something wrong")))))
- (if (not (string= buf ""))
- (setq dst (concat dst
- (std11-wrap-as-quoted-pairs
- (decode-mime-charset-string buf
- default-mime-charset)
- '(?\( ?\))))))
- dst))
-
-(defun eword-decode-quoted-string (string &optional must-unfold)
- (let ((src string)
- (buf "")
- (dst "")
- (flag-ew t))
- (while (< 0 (length src))
- (let ((ch (aref src 0))
- (decoded (and
- eword-decode-quoted-encoded-word
- flag-ew
- (eword-decode-first-encoded-words src
- eword-encoded-word-in-quoted-string-regexp
- eword-after-encoded-word-in-quoted-string-regexp
- must-unfold))))
- (if (and (not (string= buf ""))
- (or decoded (eq ch ?\")))
- (setq dst (concat dst
- (std11-wrap-as-quoted-pairs
- (decode-mime-charset-string buf
- default-mime-charset)
- '(?\")))
- buf ""))
- (cond
- (decoded
- (setq dst (concat dst
- (std11-wrap-as-quoted-pairs
- (car decoded)
- '(?\")))
- src (cdr decoded)))
- ((or (eq ch ?\"))
- (setq dst (concat dst (list ch))
- src (substring src 1)
- flag-ew t))
- ((eq ch ?\\)
- (setq buf (concat buf (list (aref src 1)))
- src (substring src 2)
- flag-ew t))
- ((or (eq ch ?\ ) (eq ch ?\t) (eq ch ?\n))
- (setq buf (concat buf (list ch))
- src (substring src 1)
- flag-ew t))
- ((string-match "\\`=?[^ \t\n\"\\\\=]*" src)