From 20bf19d4d8865ac6cf22dd46f303255f5680e73e Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 24 Apr 1998 18:57:28 +0000 Subject: [PATCH] (decode-mime-charset-string): Use 'decode-mime-charset-region. --- emu-x20.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/emu-x20.el b/emu-x20.el index 0252bbd..1c06239 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -155,12 +155,19 @@ find-file-hooks, etc. (encode-coding-string string cs) string))) -(defsubst decode-mime-charset-string (string charset) +;; (defsubst decode-mime-charset-string (string charset) +;; "Decode the STRING as MIME CHARSET." +;; (let ((cs (mime-charset-to-coding-system charset))) +;; (if cs +;; (decode-coding-string string cs) +;; string))) +(defun decode-mime-charset-string (string charset) "Decode the STRING as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (decode-coding-string string cs) - string))) + (with-temp-buffer + (insert string) + (decode-mime-charset-region (point-min)(point-max) charset) + (buffer-string) + )) (defvar charsets-mime-charset-alist -- 1.7.10.4