* elmo-util.el (elmo-multibypte-buffer-name): New constant.
(elmo-with-enable-multibyte): New macro.
* modb-entity.el (elmo-msgdb-get-decoded-cache): Use it.
+2005-02-24 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-message-fetch-string): Disable multibyte.
+
+ * elmo-util.el (elmo-multibypte-buffer-name): New constant.
+ (elmo-with-enable-multibyte): New macro.
+
+ * modb-entity.el (elmo-msgdb-get-decoded-cache): Use it.
+
2005-02-23 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-filter.el (elmo-filter-add-flag-count): Removed unused
(def-edebug-spec elmo-bind-directory
(form &rest form))
+(defconst elmo-multibypte-buffer-name " *elmo-multibyte-buffer*")
+
+(defmacro elmo-with-enable-multibyte (&rest body)
+ "Evaluate BODY with `enable-multibyte-character' as non-nil."
+ `(let ((default-enable-multibyte-characters t))
+ (with-current-buffer (get-buffer-create elmo-multibypte-buffer-name)
+ ,@body)))
+
+(put 'elmo-with-enable-multibyte 'lisp-indent-function 0)
+(def-edebug-spec elmo-with-enable-multibyte t)
+
(defun elmo-object-load (filename &optional mime-charset no-err)
"Load OBJECT from the file specified by FILENAME.
File content is decoded with MIME-CHARSET."
unread
section)
(with-temp-buffer
+ (set-buffer-multibyte nil)
(when (elmo-message-fetch folder number strategy unread section)
(buffer-string))))
(elmo-make-hash 2048))))
decoded)
(or (elmo-get-hash-val string hashtb)
- (progn
- (elmo-set-hash-val
- string
- (setq decoded
- (decode-mime-charset-string string elmo-mime-charset))
- hashtb)
- decoded)))
- (decode-mime-charset-string string elmo-mime-charset)))
+ (prog1
+ (setq decoded
+ (elmo-with-enable-multibyte
+ (decode-mime-charset-string string elmo-mime-charset)))
+ (elmo-set-hash-val string decoded hashtb))))
+ (elmo-with-enable-multibyte
+ (decode-mime-charset-string string elmo-mime-charset))))
(defsubst modb-legacy-make-message-entity (args)
"Make an message entity."