+2003-12-14 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-def.el (mime-header-accept-quoted-encoded-words): Change
+ default value to nil.
+
+2003-03-10 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * eword-decode.el (eword-analyze-quoted-string): Decode
+ quoted-encoded-words when
+ `mime-header-accept-quoted-encoded-words' is not nil.
+
+ * mime.el (mime-entity-filename): Decode quoted-encoded-words when
+ `mime-header-accept-quoted-encoded-words' is not nil.
+
+ * mime-def.el (mime-header-accept-quoted-encoded-words): New user
+ option.
+
2003-12-14 Tatsuya Kinoshita <tats@vega.ocn.ne.jp>
* eword-encode.el (mime-header-charset-encoding-alist): Add
;;-------------------------------------------------------------------------
;; Keihan Electric Railway \e$(B5~:eEE5$E4F;\e(B http://www.keihan.co.jp/
-;; \e$(B3{El@~\e(B
+;; \e-DÒtò\e-A Line \e$(B3{El@~\e(B
;;-------------------------------------------------------------------------
1.14.5 Demachiyanagi \e$(B=PD.Lx\e(B ; <=> \e$(B1CEE\e(B
+1.14.6 Marutamachi \e$(B4]B@D.\e(B
[Chao Version names]
1.14.3 Terai-Nishikuchi \e$B;{0f@>8}\e(B
1.14.4 Jid\e-Dò\e-Asha-Renraku \e$B<+F0<VO"Mm\e(B
1.14.5 Hon-Terai \e$BK\;{0f\e(B
------- Suenobu-Ushijima \e$BKv?.5mEg\e(B
+1.14.6 Suenobu-Ushijima \e$BKv?.5mEg\e(B
------ Kaga-Sano \e$B2C2l:4Ln\e(B
------ Yunotani-Ishiko \e$BErC+@P;R\e(B
------ Tokuhisa \e$BFA5W\e(B
;;; eword-decode.el --- RFC 2047 based encoded-word decoder for GNU Emacs
-;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98,99,2000,01,03 Free Software Foundation, Inc.
;; Author: ENAMI Tsugutomo <enami@sys.ptg.sony.co.jp>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
be the result.")
(defun eword-analyze-quoted-string (string start &optional must-unfold)
- (let ((p (std11-check-enclosure string ?\" ?\" nil start)))
- (if p
- (cons (cons 'quoted-string
- (decode-mime-charset-string
- (std11-strip-quoted-pair
- (substring string (1+ start) (1- p)))
- default-mime-charset))
- ;;(substring string p))
- p))))
+ (let ((p (std11-check-enclosure string ?\" ?\" nil start))
+ ret)
+ (when p
+ (setq ret (decode-mime-charset-string
+ (std11-strip-quoted-pair
+ (substring string (1+ start) (1- p)))
+ default-mime-charset))
+ (if mime-header-accept-quoted-encoded-words
+ (setq ret (eword-decode-string ret)))
+ (cons (cons 'quoted-string ret)
+ p))))
(defun eword-analyze-domain-literal (string start &optional must-unfold)
(std11-analyze-domain-literal string start))
;;; mime-def.el --- definition module about MIME -*- coding: iso-2022-jp; -*-
-;; Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98,99,2000,2001,2002,2003
+;; Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <tomo@m17n.org>
;; Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
(eval-when-compile (require 'luna)) ; luna-arglist-to-arguments
(eval-and-compile
- (defconst mime-library-product ["CLIME" (1 14 5) "\e$BK\;{0f\e(B"]
+ (defconst mime-library-product ["CLIME" (1 14 6) "\e$BKv?.5mEg\e(B"]
"Product name, version number and code name of MIME-library package."))
(defmacro mime-product-name (product)
:type '(choice (integer :tag "Limit (bytes)")
(const :tag "Don't limit" nil)))
+(defcustom mime-header-accept-quoted-encoded-words nil
+ "*Accept encoded-words in quoted-strings."
+ :group 'mime-header
+ :type 'boolean)
+
+
;;; @@@ encoding
;;;
;;; mime.el --- MIME library module
-;; Copyright (C) 1998,1999,2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998,1999,2000,2001,2003 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <tomo@m17n.org>
;; Keywords: MIME, multimedia, mail, news
(defun mime-entity-filename (entity)
"Return filename of ENTITY."
(or (mime-entity-uu-filename entity)
- (mime-content-disposition-filename
- (mime-entity-content-disposition entity))
+ (let ((ret (mime-content-disposition-filename
+ (mime-entity-content-disposition entity))))
+ (if (and mime-header-accept-quoted-encoded-words
+ ret)
+ (eword-decode-string ret)
+ ret))
(cdr (let ((param (mime-content-type-parameters
(mime-entity-content-type entity))))
(or (assoc "name" param)
- (assoc "x-name" param))
- ))))
+ (assoc "x-name" param))))))
(defsubst mime-entity-media-type (entity)