# HG changeset patch # User ShengHuo ZHU # Date 1010069465 0 # Node ID 9b68dff3d385c0fcf426e8122c6381cc191bd673 # Parent e4c6344ca1631272a2f9ac9235812b13f2308ab1 * 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. diff -r e4c6344ca163 -r 9b68dff3d385 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Thu Jan 03 11:30:57 2002 +0000 +++ b/lisp/gnus/ChangeLog Thu Jan 03 14:51:05 2002 +0000 @@ -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 -r e4c6344ca163 -r 9b68dff3d385 lisp/gnus/mm-util.el --- a/lisp/gnus/mm-util.el Thu Jan 03 11:30:57 2002 +0000 +++ b/lisp/gnus/mm-util.el Thu Jan 03 14:51:05 2002 +0000 @@ -281,6 +281,10 @@ '(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 @@ (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 -r e4c6344ca163 -r 9b68dff3d385 lisp/gnus/nntp.el --- a/lisp/gnus/nntp.el Thu Jan 03 11:30:57 2002 +0000 +++ b/lisp/gnus/nntp.el Thu Jan 03 14:51:05 2002 +0000 @@ -397,8 +397,10 @@ (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))