summaryrefslogtreecommitdiff
path: root/lisp/gnus/nnspool.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2016-02-12 16:03:22 +1100
committerLars Ingebrigtsen <larsi@gnus.org>2016-02-12 16:03:22 +1100
commitce10b20710dcdf6952a8e6a8de1d054f17bdd883 (patch)
tree0f307b5d43a843e52ae6dbda5e4b0ca88e68837c /lisp/gnus/nnspool.el
parent49d0595f1f09bdaec7f6eb5a6ef86014cecf6746 (diff)
downloademacs-ce10b20710dcdf6952a8e6a8de1d054f17bdd883.tar.gz
Encode before sending from nnspool
* lisp/gnus/nnspool.el (nnspool-request-post): Encode data before sending it to the news server.
Diffstat (limited to 'lisp/gnus/nnspool.el')
-rw-r--r--lisp/gnus/nnspool.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el
index 620b8acae0b..07624f230f3 100644
--- a/lisp/gnus/nnspool.el
+++ b/lisp/gnus/nnspool.el
@@ -335,6 +335,7 @@ there.")
(save-excursion
(let* ((process-connection-type nil) ; t bugs out on Solaris
(inews-buffer (generate-new-buffer " *nnspool post*"))
+ (buf (current-buffer))
(proc
(condition-case err
(apply 'start-process "*nnspool inews*" inews-buffer
@@ -346,7 +347,11 @@ there.")
()
(nnheader-report 'nnspool "")
(set-process-sentinel proc 'nnspool-inews-sentinel)
- (mm-with-unibyte-current-buffer
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert-buffer-substring buf)
+ (encode-coding-region (point-min) (point-max)
+ nnspool-file-coding-system)
(process-send-region proc (point-min) (point-max)))
;; We slap a condition-case around this, because the process may
;; have exited already...