From 1f7d2e140f4293a933fd96355aa17c08581fc4de Mon Sep 17 00:00:00 2001 From: ShengHuo ZHU Date: Thu, 3 Jan 2002 14:51:05 +0000 Subject: [PATCH] * mm-util.el (mm-use-find-coding-systems-region): New variable. (mm-find-mime-charset-region): Use it. * nntp.el (nntp-send-buffer): Use mm-with-unibyte-current-buffer. --- lisp/gnus/ChangeLog | 3 +++ lisp/gnus/mm-util.el | 6 +++++- lisp/gnus/nntp.el | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 440c98695b2..83f8d7b796b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,6 +1,9 @@ 2002-01-03 ShengHuo ZHU * mm-util.el (mm-charset-to-coding-system): Don't setq charset. + * mm-util.el (mm-use-find-coding-systems-region): New variable. + (mm-find-mime-charset-region): Use it. + * nntp.el (nntp-send-buffer): Use mm-with-unibyte-current-buffer. 2002-01-01 ShengHuo ZHU diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 6e56f9b12ef..bbc16c04879 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -281,6 +281,10 @@ prefer iso-2022-jp to japanese-shift-jis: '(iso-2022-jp iso-2022-jp-2 japanese-shift-jis utf-8)) ") +(defvar mm-use-find-coding-systems-region + (fboundp 'find-coding-systems-region) + "Use `find-coding-systems-region' to find proper coding systems.") + ;;; Internal variables: ;;; Functions: @@ -494,7 +498,7 @@ charset, and a longer list means no appropriate charset." (let (charsets) ;; The return possibilities of this function are a mess... (or (and (mm-multibyte-p) - (fboundp 'find-coding-systems-region) + mm-use-find-coding-systems-region ;; Find the mime-charset of the most preferred coding ;; system that has one. (let ((systems (find-coding-systems-region b e))) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 803fd975e5e..227b864f125 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -397,8 +397,10 @@ noticing asynchronous data.") (set-buffer (nntp-find-connection-buffer nntp-server-buffer)) (erase-buffer))) (nntp-encode-text) - (process-send-region (nntp-find-connection nntp-server-buffer) - (point-min) (point-max)) + (mm-with-unibyte-current-buffer + ;; Some encoded unicode text contains character 0x80-0x9f e.g. Euro. + (process-send-region (nntp-find-connection nntp-server-buffer) + (point-min) (point-max))) (nntp-retrieve-data nil nntp-address nntp-port-number nntp-server-buffer wait-for nnheader-callback-function)) -- 2.39.2