`insert-file-contents-as-binary' instead of `insert-file-contents'.
* mel-q-ccl.el (quoted-printable-ccl-insert-encoded-file):
Likewise.
+2006-06-12 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * mel-b-ccl.el (base64-ccl-insert-encoded-file): Use
+ `insert-file-contents-as-binary' instead of `insert-file-contents'.
+
+ * mel-q-ccl.el (quoted-printable-ccl-insert-encoded-file):
+ Likewise.
+
2006-02-18 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* smtp.el (smtp-debug): New user option.
(defun base64-ccl-insert-encoded-file (filename)
"Encode contents of file FILENAME to base64, and insert the result."
(interactive "*fInsert encoded file: ")
- (let ((coding-system-for-read 'mel-ccl-base64-lf-rev)
- format-alist)
- (insert-file-contents filename)))
+ (insert
+ (decode-coding-string
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert-file-contents-as-binary filename)
+ (buffer-string))
+ 'mel-ccl-base64-lf-rev)))
(mel-define-method-function (mime-encode-string string (nil "base64"))
'base64-ccl-encode-string)
(defun quoted-printable-ccl-insert-encoded-file (filename)
"Encode contents of the file named as FILENAME, and insert it."
(interactive "*fInsert encoded file: ")
- (let ((coding-system-for-read 'mel-ccl-quoted-printable-lf-lf-rev)
- format-alist)
- (insert-file-contents filename)))
+ (insert
+ (decode-coding-string
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert-file-contents-as-binary filename)
+ (buffer-string))
+ 'mel-ccl-quoted-printable-lf-lf-rev)))
(mel-define-method-function
(mime-encode-string string (nil "quoted-printable"))