(nnshimbun-retrieve-url): Do not disable buffer multibyte, when use cached url
authorkeiichi <keiichi>
Thu, 15 Jun 2000 07:46:35 +0000 (07:46 +0000)
committerkeiichi <keiichi>
Thu, 15 Jun 2000 07:46:35 +0000 (07:46 +0000)
content. (CAUTION: This is ``ad hok''. Please check ``WHY''.)

lisp/nnshimbun.el

index 99aaffa..78ffd9b 100644 (file)
   "Rertrieve URL contents and insert to current buffer."
   (let ((coding-system-for-read 'binary)
        (coding-system-for-write 'binary))
-    (set-buffer-multibyte nil)
+    ;; XXX: Ad hok.
+    (when (or no-cache
+             (not (file-exists-p
+                   (url-cache-create-filename url))))
+      (set-buffer-multibyte nil))
     ;; Following code is imported from `url-insert-file-contents'.
     (save-excursion
       (let ((old-asynch (default-value 'url-be-asynchronous))
   (if (fboundp 'eword-encode-string)
       ;; For Semi-Gnus.
       (defun nnshimbun-mime-encode-string (string)
-       (mapconcat
-        #'identity
-        (split-string (eword-encode-string (nnweb-decode-entities-string string)) "\n")
-        ""))
+       (if (zerop (length string))
+           ""
+         (mapconcat
+          #'identity
+          (split-string (eword-encode-string (nnweb-decode-entities-string string)) "\n")
+          "")))
     ;; For pure Gnus.
     (defun nnshimbun-mime-encode-string (string)
       (mapconcat