From: ueno Date: Mon, 23 Oct 2006 08:47:14 +0000 (+0000) Subject: * mixi.el (mixi-curl-retrieve): Make the temp buffer multibyte. X-Git-Tag: cache-file-branchpoint~50 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a34cf3fe45b36079df8e6fb91e0fc36f2b410eef;p=elisp%2Fmixi.git * mixi.el (mixi-curl-retrieve): Make the temp buffer multibyte. --- diff --git a/ChangeLog b/ChangeLog index 3b0694c..599585d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-10-23 Daiki Ueno + * mixi.el (mixi-curl-retrieve): Make the temp buffer multibyte. + +2006-10-23 Daiki Ueno + * mixi.el (mixi-curl-retrieve): New function. (mixi-retrieve-function): Don't use NOERROR arg of require. diff --git a/mixi.el b/mixi.el index 3303209..6b2b333 100644 --- a/mixi.el +++ b/mixi.el @@ -256,7 +256,11 @@ Increase this value when unexpected error frequently occurs." (defun mixi-curl-retrieve (url &optional post-data) "Retrieve the URL and return gotten strings." (with-temp-buffer + (if (fboundp 'set-buffer-multibyte) + (set-buffer-multibyte nil)) (let ((orig-mode (default-file-modes)) + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) process ret) (unwind-protect (progn @@ -282,8 +286,7 @@ Increase this value when unexpected error frequently occurs." (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ 200") (error (mixi-message "Cannot retrieve"))) (delete-region (point) (re-search-forward "\r?\n\r?\n")) - (setq ret (decode-coding-string (buffer-substring (point) (point-max)) - mixi-coding-system)) + (setq ret (decode-coding-string (buffer-string) mixi-coding-system)) (mixi-retrieve-1 ret url post-data)))) (defconst mixi-my-id-regexp