If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
+such as a version of Net$cape).
+
+The language informations specified in the encoded words, if any, are
+put to the decoded text as the `mime-language' text property."
(setq string (std11-unfold-string string))
(let ((regexp (concat "[\n\t ]*\\(" eword-encoded-word-regexp "\\)"))
(next 0)
(while match
(setq next (match-end 0))
(push (list (match-string 2 string) ;; charset
- (match-string 3 string) ;; language
+ (when (match-beginning 3) ;; language
+ (intern
+ (downcase
+ (substring string
+ (1+ (match-beginning 3)) (match-end 3)))))
(match-string 4 string) ;; encoding
(match-string 5 string) ;; encoded-text
(match-string 1 string)) ;; encoded-word
If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
+such as a version of Net$cape).
+
+The language informations specified in the encoded words, if any, are
+put to the decoded text as the `mime-language' text property."
(interactive "*r")
(save-excursion
(save-restriction
(while match
(goto-char (setq end (match-end 0)))
(push (list (match-string 2) ;; charset
- (match-string 3) ;; language
+ (when (match-beginning 3) ;; language
+ (intern
+ (downcase
+ (buffer-substring (1+ (match-beginning 3))
+ (match-end 3)))))
(match-string 4) ;; encoding
(match-string 5) ;; encoded-text
(match-string 1)) ;; encoded-word
(while match
(setq next (match-end 0))
(push (list (match-string 2 string) ;; charset
- (match-string 3 string) ;; language
+ (when (match-beginning 3) ;; language
+ (intern
+ (downcase
+ (substring string
+ (1+ (match-beginning 3)) (match-end 3)))))
(match-string 4 string) ;; encoding
(match-string 5 string) ;; encoded-text
(match-string 1 string)) ;; encoded-word