]> code.delx.au - gnu-emacs/commitdiff
Encode before sending from nnspool
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 12 Feb 2016 05:03:22 +0000 (16:03 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 12 Feb 2016 05:03:22 +0000 (16:03 +1100)
* lisp/gnus/nnspool.el (nnspool-request-post): Encode data
before sending it to the news server.

lisp/gnus/nnspool.el

index 620b8acae0b4dcdc55b1958c34fb3df2ea9f71cf..07624f230f3a049686a20b82043b2c6c0e115fae 100644 (file)
@@ -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...