diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/ChangeLog.semi-patch lisp/ChangeLog.semi-patch
--- /usr/local/share/emacs/20.0.93/lisp/gnus/ChangeLog.semi-patch	Thu Jan  1 09:00:00 1970
+++ lisp/ChangeLog.semi-patch	Fri Aug 15 11:42:04 1997
@@ -0,0 +1,100 @@
+1997-08-14  Tomohiko Morioka  <tmorioka@mule.etl.go.jp>
+
+	* nnfolder.el (nnfolder-request-list): Override
+	'nnmail-file-coding-system' by 'nnmail-active-file-coding-system';
+	
+	(nnfolder-request-list, nnfolder-possibly-change-group): Protect
+	from conversion by `pathname-coding-system' for XEmacs/mule.
+
+	(nnfolder-group-pathname): Encode pathname for Emacs 20.
+
+	* nnmh.el (nnmh-request-list, nnmh-active-number): Protect from
+	conversion by `pathname-coding-system' for XEmacs/mule.
+
+	* nnml.el (nnml-possibly-change-directory): Protect from
+	conversion by `pathname-coding-system' for XEmacs/mule.
+
+	* nnspool.el (nnspool-file-coding-system): New variable.
+
+	(nnspool-retrieve-headers, nnspool-retrieve-headers-with-nov,
+	nnspool-find-file): Override `nnheader-file-coding-system' by
+	`nnspool-file-coding-system' for gnspool on Windows 95/NT.
+
+1997-08-14  Miyashita Hisashi  <himi@etl.go.jp>
+
+	* pop3.el (pop3-movemail-file-coding-system): append it for
+	assigning a coding system to receive mail with pop3.
+	(pop3-movemail): modify for writing messages with
+	pop3-movemail-file-coding-system.
+
+1997-08-12  Tomohiko Morioka  <tmorioka@mule.etl.go.jp>
+
+	* nnmail.el (nnmail-active-file-coding-system): New variable.
+	
+	(nnmail-insert-xref): Encode pathname for Emacs 20.
+	
+	(nnmail-write-region, nnmh-retrieve-headers, nnmh-request-article,
+	nnmh-request-group, nnmh-possibly-change-directory): Protect from
+	conversion by `pathname-coding-system' for XEmacs/mule.
+
+	* nnml.el (nnml-retrieve-headers, nnml-request-article,
+	nnml-request-group, nnml-request-list): Protect from conversion by
+	`pathname-coding-system' for XEmacs/mule.
+
+1997-08-10  Tomohiko Morioka  <tmorioka@mule.etl.go.jp>
+
+	* nnheader.el (nnheader-pathname-coding-system): New variable.
+	(nnheader-group-pathname): Encode pathname for Emacs 20.
+	
+	* nnmail.el (nnmail-pathname-coding-system): New variable.
+	(nnmail-group-pathname): Encode pathname for Emacs 20.
+
+1997-06-18  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* gnus-sum.el (gnus-structured-field-decoder): New variable.
+
+	(gnus-get-newsgroup-headers, gnus-nov-parse-line): Use
+	`gnus-structured-field-decoder' for Subject field.
+
+1997-06-13  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* gnus-sum.el (gnus-unstructured-field-decoder): New variable.
+	
+	(gnus-get-newsgroup-headers, gnus-nov-parse-line): Use
+	`gnus-unstructured-field-decoder' for Subject field instead of
+	`gnus-header-decoder'; Variable `gnus-header-decoder' was
+	abolished.
+
+Fri May 16 06:15:11 1997  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* nnheader.el (nnheader-find-file-noselect): bind
+	`coding-system-for-read' with `nnheader-file-coding-system' for
+	Emacs/mule and XEmacs/mule.
+
+Sun May  4 14:52:50 1997  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* gnus-sum.el (gnus-header-decoder): New variable.
+
+	(gnus-get-newsgroup-headers): Use `gnus-header-decoder' for From
+	and Subject field.
+
+	(gnus-nov-parse-line): Use `gnus-header-decoder' for From and
+	Subject field.
+
+	* nnmail.el (nnmail-file-coding-system): New variable.
+
+	(nnmail-find-file): bind `coding-system-for-read' with
+	`nnmail-file-coding-system' for Emacs/mule and XEmacs/mule.
+
+	(nnmail-write-region): bind `coding-system-for-write' with
+	`nnmail-file-coding-system' for Emacs/mule and XEmacs/mule.
+
+	* nnheader.el (nnheader-file-coding-system): New variable.
+
+	(nnheader-insert-file-contents): bind `coding-system-for-read'
+	with `nnheader-file-coding-system' for Emacs/mule and XEmacs/mule.
+
+	* nntp.el (nntp-coding-system-for-read): New variable.
+
+	(nntp-open-connection): bind `coding-system-for-read' with
+	`nntp-coding-system-for-read' for Emacs/mule and XEmacs/mule.
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/gnus-sum.el lisp/gnus-sum.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/gnus-sum.el	Thu Apr 17 06:55:33 1997
+++ lisp/gnus-sum.el	Fri Aug 15 09:51:05 1997
@@ -617,6 +617,17 @@
   :group 'gnus-summary-visual
   :type 'hook)
 
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defcustom gnus-structured-field-decoder 'identity
+  "Function to decode non-ASCII characters in structured field for summary."
+  :group 'gnus-various
+  :type 'function)
+
+(defcustom gnus-unstructured-field-decoder 'identity
+  "Function to decode non-ASCII characters in unstructured field for summary."
+  :group 'gnus-various
+  :type 'function)
+
 (defcustom gnus-parse-headers-hook
   (list 'gnus-decode-rfc1522)
   "*A hook called before parsing the headers."
@@ -4142,12 +4153,18 @@
 	    (progn
 	      (goto-char p)
 	      (if (search-forward "\nsubject: " nil t)
-		  (nnheader-header-value) "(none)"))
+		  ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+		  (funcall
+		   gnus-unstructured-field-decoder (nnheader-header-value))
+		"(none)"))
 	    ;; From.
 	    (progn
 	      (goto-char p)
 	      (if (search-forward "\nfrom: " nil t)
-		  (nnheader-header-value) "(nobody)"))
+		  ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+		  (funcall
+		   gnus-structured-field-decoder (nnheader-header-value))
+		"(nobody)"))
 	    ;; Date.
 	    (progn
 	      (goto-char p)
@@ -4282,8 +4299,11 @@
 	  (setq header
 		(vector
 		 number			; number
-		 (gnus-nov-field)	; subject
-		 (gnus-nov-field)	; from
+		 ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+		 (funcall
+		  gnus-unstructured-field-decoder (gnus-nov-field)) ; subject
+		 (funcall
+		  gnus-structured-field-decoder (gnus-nov-field))   ; from
 		 (gnus-nov-field)	; date
 		 (setq id (or (gnus-nov-field)
 			      (nnheader-generate-fake-message-id))) ; id
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nnfolder.el lisp/nnfolder.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nnfolder.el	Thu Apr 17 06:57:10 1997
+++ lisp/nnfolder.el	Fri Aug 15 10:13:26 1997
@@ -282,8 +282,12 @@
 (deffoo nnfolder-request-list (&optional server)
   (nnfolder-possibly-change-group nil server)
   (save-excursion
-    (nnmail-find-file nnfolder-active-file)
-    (setq nnfolder-group-alist (nnmail-get-active))
+    ;; 1997/8/14 by MORIOKA Tomohiko
+    ;;    for XEmacs/mule.
+    (let ((nnmail-file-coding-system nnmail-active-file-coding-system)
+	  (pathname-coding-system 'binary)) ; for XEmacs/mule
+      (nnmail-find-file nnfolder-active-file)
+      (setq nnfolder-group-alist (nnmail-get-active)))
     t))
 
 (deffoo nnfolder-request-newgroups (date &optional server)
@@ -499,45 +503,48 @@
   ;; Change group.
   (when (and group
 	     (not (equal group nnfolder-current-group)))
-    (nnmail-activate 'nnfolder)
-    (when (and (not (assoc group nnfolder-group-alist))
-	       (not (file-exists-p
-		     (nnfolder-group-pathname group))))
-      ;; The group doesn't exist, so we create a new entry for it.
-      (push (list group (cons 1 0)) nnfolder-group-alist)
-      (nnmail-save-active nnfolder-group-alist nnfolder-active-file))
-
-    (if dont-check
-	(setq nnfolder-current-group group)
-      (let (inf file)
-	;; If we have to change groups, see if we don't already have the
-	;; folder in memory.  If we do, verify the modtime and destroy
-	;; the folder if needed so we can rescan it.
-	(when (setq inf (assoc group nnfolder-buffer-alist))
-	  (setq nnfolder-current-buffer (nth 1 inf)))
-
-	;; If the buffer is not live, make sure it isn't in the alist.  If it
-	;; is live, verify that nobody else has touched the file since last
-	;; time.
-	(when (and nnfolder-current-buffer
-		   (not (gnus-buffer-live-p nnfolder-current-buffer)))
-	  (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
-		nnfolder-current-buffer nil))
-
-	(setq nnfolder-current-group group)
-
-	(when (or (not nnfolder-current-buffer)
-		  (not (verify-visited-file-modtime nnfolder-current-buffer)))
-	  (save-excursion
-	    (setq file (nnfolder-group-pathname group))
-	    ;; See whether we need to create the new file.
-	    (unless (file-exists-p file)
-	      (gnus-make-directory (file-name-directory file))
-	      (nnmail-write-region 1 1 file t 'nomesg))
-	    (when (setq nnfolder-current-buffer (nnfolder-read-folder group))
-	      (set-buffer nnfolder-current-buffer)
-	      (push (list group nnfolder-current-buffer)
-		    nnfolder-buffer-alist))))))))
+    ;; 1997/8/14 by MORIOKA Tomohiko
+    ;;    for XEmacs/mule.
+    (let ((pathname-coding-system 'binary))
+      (nnmail-activate 'nnfolder)
+      (when (and (not (assoc group nnfolder-group-alist))
+		 (not (file-exists-p
+		       (nnfolder-group-pathname group))))
+	;; The group doesn't exist, so we create a new entry for it.
+	(push (list group (cons 1 0)) nnfolder-group-alist)
+	(nnmail-save-active nnfolder-group-alist nnfolder-active-file))
+      
+      (if dont-check
+	  (setq nnfolder-current-group group)
+	(let (inf file)
+	  ;; If we have to change groups, see if we don't already have the
+	  ;; folder in memory.  If we do, verify the modtime and destroy
+	  ;; the folder if needed so we can rescan it.
+	  (when (setq inf (assoc group nnfolder-buffer-alist))
+	    (setq nnfolder-current-buffer (nth 1 inf)))
+	  
+	  ;; If the buffer is not live, make sure it isn't in the alist.  If it
+	  ;; is live, verify that nobody else has touched the file since last
+	  ;; time.
+	  (when (and nnfolder-current-buffer
+		     (not (gnus-buffer-live-p nnfolder-current-buffer)))
+	    (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
+		  nnfolder-current-buffer nil))
+	  
+	  (setq nnfolder-current-group group)
+	  
+	  (when (or (not nnfolder-current-buffer)
+		    (not (verify-visited-file-modtime nnfolder-current-buffer)))
+	    (save-excursion
+	      (setq file (nnfolder-group-pathname group))
+	      ;; See whether we need to create the new file.
+	      (unless (file-exists-p file)
+		(gnus-make-directory (file-name-directory file))
+		(nnmail-write-region 1 1 file t 'nomesg))
+	      (when (setq nnfolder-current-buffer (nnfolder-read-folder group))
+		(set-buffer nnfolder-current-buffer)
+		(push (list group nnfolder-current-buffer)
+		      nnfolder-buffer-alist)))))))))
 
 (defun nnfolder-save-mail (group-art-list)
   "Called narrowed to an article."
@@ -749,6 +756,9 @@
 
 (defun nnfolder-group-pathname (group)
   "Make pathname for GROUP."
+  ;; 1997/8/14 by MORIOKA Tomohiko
+  ;;	encode file name for Emacs 20.
+  (setq group (encode-coding-string group nnmail-pathname-coding-system))
   (let ((dir (file-name-as-directory (expand-file-name nnfolder-directory))))
     ;; If this file exists, we use it directly.
     (if (or nnmail-use-long-file-names
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nnheader.el lisp/nnheader.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nnheader.el	Thu Apr 17 06:57:17 1997
+++ lisp/nnheader.el	Fri Aug 15 09:51:06 1997
@@ -667,6 +667,11 @@
   (or (not (numberp gnus-verbose-backends))
       (<= level gnus-verbose-backends)))
 
+;; 1997/8/10 by MORIOKA Tomohiko
+(defvar nnheader-pathname-coding-system
+  'iso-8859-1
+  "*Coding system for pathname.")
+
 (defun nnheader-group-pathname (group dir &optional file)
   "Make pathname for GROUP."
   (concat
@@ -675,7 +680,13 @@
      (if (file-directory-p (concat dir group))
 	 (concat dir group "/")
        ;; If not, we translate dots into slashes.
-       (concat dir (nnheader-replace-chars-in-string group ?. ?/) "/")))
+       (concat dir
+	       ;; 1997/8/10 by MORIOKA Tomohiko
+	       ;;	encode file name for Emacs 20.
+	       (encode-coding-string
+		(nnheader-replace-chars-in-string group ?. ?/)
+		nnheader-pathname-coding-system)
+	       "/")))
    (cond ((null file) "")
 	 ((numberp file) (int-to-string file))
 	 (t file))))
@@ -732,6 +743,10 @@
       (when (string-match (car ange-ftp-path-format) path)
 	(ange-ftp-re-read-dir path)))))
 
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defvar nnheader-file-coding-system nil
+  "Coding system used in file backends of Gnus.")
+
 (defun nnheader-insert-file-contents (filename &optional visit beg end replace)
   "Like `insert-file-contents', q.v., but only reads in the file.
 A buffer may be modified in several ways after reading into the buffer due
@@ -741,7 +756,9 @@
   (let ((format-alist nil)
 	(auto-mode-alist (nnheader-auto-mode-alist))
 	(default-major-mode 'fundamental-mode)
-        (after-insert-file-functions nil))
+        (after-insert-file-functions nil)
+	;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+	(coding-system-for-read nnheader-file-coding-system))
     (insert-file-contents filename visit beg end replace)))
 
 (defun nnheader-find-file-noselect (&rest args)
@@ -749,7 +766,9 @@
 	(auto-mode-alist (nnheader-auto-mode-alist))
 	(default-major-mode 'fundamental-mode)
 	(enable-local-variables nil)
-        (after-insert-file-functions nil))
+        (after-insert-file-functions nil)
+	;; 1997/5/16 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+	(coding-system-for-read nnheader-file-coding-system))
     (apply 'find-file-noselect args)))
 
 (defun nnheader-auto-mode-alist ()
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nnmail.el lisp/nnmail.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nnmail.el	Thu Apr 17 06:57:54 1997
+++ lisp/nnmail.el	Fri Aug 15 09:51:06 1997
@@ -469,6 +469,10 @@
 (defun nnmail-request-post (&optional server)
   (mail-send-and-exit nil))
 
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defvar nnmail-file-coding-system nil
+  "Coding system used in nnmail.")
+
 (defun nnmail-find-file (file)
   "Insert FILE in server buffer safely."
   (set-buffer nntp-server-buffer)
@@ -476,9 +480,20 @@
   (let ((format-alist nil)
         (after-insert-file-functions nil))
     (condition-case ()
-	(progn (insert-file-contents file) t)
+	;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+	(let ((coding-system-for-read nnmail-file-coding-system)
+	      ;; 1997/8/12 by MORIOKA Tomohiko
+	      ;;	for XEmacs/mule.
+	      (pathname-coding-system 'binary))
+	  (insert-file-contents file)
+	  t)
       (file-error nil))))
 
+;; 1997/8/10 by MORIOKA Tomohiko
+(defvar nnmail-pathname-coding-system
+  'iso-8859-1
+  "*Coding system for pathname.")
+
 (defun nnmail-group-pathname (group dir &optional file)
   "Make pathname for GROUP."
   (concat
@@ -488,7 +503,13 @@
 	     (file-directory-p (concat dir group)))
 	 (concat dir group "/")
        ;; If not, we translate dots into slashes.
-       (concat dir (nnheader-replace-chars-in-string group ?. ?/) "/")))
+       (concat dir
+	       ;; 1997/8/10 by MORIOKA Tomohiko
+	       ;;	encode file name for Emacs 20.
+	       (encode-coding-string
+		(nnheader-replace-chars-in-string group ?. ?/)
+		nnmail-pathname-coding-system)
+	       "/")))
    (or file "")))
 
 (defun nnmail-date-to-time (date)
@@ -667,11 +688,17 @@
 	      group-assoc)))
     group-assoc))
 
+;; 1997/8/12 by MORIOKA Tomohiko
+(defvar nnmail-active-file-coding-system
+  'iso-8859-1
+  "*Coding system for active file.")
+
 (defun nnmail-save-active (group-assoc file-name)
   "Save GROUP-ASSOC in ACTIVE-FILE."
-  (when file-name
-    (nnheader-temp-write file-name
-      (nnmail-generate-active group-assoc))))
+  (let ((coding-system-for-write nnmail-active-file-coding-system))
+    (when file-name
+      (nnheader-temp-write file-name
+	(nnmail-generate-active group-assoc)))))
 
 (defun nnmail-generate-active (alist)
   "Generate an active file from group-alist ALIST."
@@ -1111,7 +1138,12 @@
 		       (progn (forward-line 1) (point))))
       (insert (format "Xref: %s" (system-name)))
       (while group-alist
-	(insert (format " %s:%d" (caar group-alist) (cdar group-alist)))
+	;; 1997/8/10 by MORIOKA Tomohiko
+	;;	encode file name for Emacs 20.
+	(insert (format " %s:%d"
+			(encode-coding-string (caar group-alist)
+					      nnmail-pathname-coding-system)
+			(cdar group-alist)))
 	(setq group-alist (cdr group-alist)))
       (insert "\n"))))
 
@@ -1602,8 +1634,13 @@
 
 (defun nnmail-write-region (start end filename &optional append visit lockname)
   "Do a `write-region', and then set the file modes."
-  (write-region start end filename append visit lockname)
-  (set-file-modes filename nnmail-default-file-modes))
+  ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+  (let ((coding-system-for-write nnmail-file-coding-system)
+	;; 1997/8/12 by MORIOKA Tomohiko
+	;;	for XEmacs/mule.
+	(pathname-coding-system 'binary))
+    (write-region start end filename append visit lockname)
+    (set-file-modes filename nnmail-default-file-modes)))
 
 ;;;
 ;;; Status functions
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nnmh.el lisp/nnmh.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nnmh.el	Thu Apr 17 06:58:12 1997
+++ lisp/nnmh.el	Fri Aug 15 10:15:12 1997
@@ -76,6 +76,9 @@
 	   (large (and (numberp nnmail-large-newsgroup)
 		       (> number nnmail-large-newsgroup)))
 	   (count 0)
+	   ;; 1997/8/12 by MORIOKA Tomohiko
+	   ;;	for XEmacs/mule.
+	   (pathname-coding-system 'binary)
 	   beg article)
       (nnmh-possibly-change-directory newsgroup server)
       ;; We don't support fetching by Message-ID.
@@ -134,6 +137,9 @@
   (let ((file (if (stringp id)
 		  nil
 		(concat nnmh-current-directory (int-to-string id))))
+	;; 1997/8/12 by MORIOKA Tomohiko
+	;;	for XEmacs/mule.
+	(pathname-coding-system 'binary)
 	(nntp-server-buffer (or buffer nntp-server-buffer)))
     (and (stringp file)
 	 (file-exists-p file)
@@ -143,6 +149,9 @@
 
 (deffoo nnmh-request-group (group &optional server dont-check)
   (let ((pathname (nnmail-group-pathname group nnmh-directory))
+	;; 1997/8/12 by MORIOKA Tomohiko
+	;;	for XEmacs/mule.
+	(pathname-coding-system 'binary)
 	dir)
     (cond
      ((not (file-directory-p pathname))
@@ -181,7 +190,10 @@
 
 (deffoo nnmh-request-list (&optional server dir)
   (nnheader-insert "")
-  (let ((nnmh-toplev
+  (let (;; 1997/8/14 by MORIOKA Tomohiko
+ 	;;	for XEmacs/mule.
+ 	(pathname-coding-system 'binary)
+	(nnmh-toplev
 	 (or dir (file-truename (file-name-as-directory nnmh-directory)))))
     (nnmh-request-list-1 nnmh-toplev))
   (setq nnmh-group-alist (nnmail-get-active))
@@ -220,7 +232,9 @@
 				(expand-file-name nnmh-toplev))))
 	       dir)
 	      (nnheader-replace-chars-in-string
-	       (substring dir (match-end 0)) ?/ ?.))
+	       (decode-coding-string (substring dir (match-end 0))
+				     nnmail-pathname-coding-system)
+	       ?/ ?.))
 	    (apply 'max files)
 	    (apply 'min files)))))))
   t)
@@ -396,7 +410,10 @@
 	     (not (nnmh-server-opened server)))
     (nnmh-open-server server))
   (when newsgroup
-    (let ((pathname (nnmail-group-pathname newsgroup nnmh-directory)))
+    (let ((pathname (nnmail-group-pathname newsgroup nnmh-directory))
+	  ;; 1997/8/12 by MORIOKA Tomohiko
+	  ;;	for XEmacs/mule.
+	  (pathname-coding-system 'binary))
       (if (file-directory-p pathname)
 	  (setq nnmh-current-directory pathname)
 	(error "No such newsgroup: %s" newsgroup)))))
@@ -444,7 +461,10 @@
 (defun nnmh-active-number (group)
   "Compute the next article number in GROUP."
   (let ((active (cadr (assoc group nnmh-group-alist)))
-	(dir (nnmail-group-pathname group nnmh-directory)))
+	(dir (nnmail-group-pathname group nnmh-directory))
+	;; 1997/8/14 by MORIOKA Tomohiko
+	;;	for XEmacs/mule.
+	(pathname-coding-system 'binary))
     (unless active
       ;; The group wasn't known to nnmh, so we just create an active
       ;; entry for it.
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nnml.el lisp/nnml.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nnml.el	Thu Apr 17 06:58:17 1997
+++ lisp/nnml.el	Fri Aug 15 10:42:26 1997
@@ -98,6 +98,9 @@
       (let ((file nil)
 	    (number (length sequence))
 	    (count 0)
+	    ;; 1997/8/12 by MORIOKA Tomohiko
+	    ;;	for XEmacs/mule.
+	    (pathname-coding-system 'binary)
 	    beg article)
 	(if (stringp (car sequence))
 	    'headers
@@ -160,6 +163,9 @@
 (deffoo nnml-request-article (id &optional group server buffer)
   (nnml-possibly-change-directory group server)
   (let* ((nntp-server-buffer (or buffer nntp-server-buffer))
+	 ;; 1997/8/12 by MORIOKA Tomohiko
+	 ;;	for XEmacs/mule.
+	 (pathname-coding-system 'binary)
 	 path gpath group-num)
     (if (stringp id)
 	(when (and (setq group-num (nnml-find-group-number id))
@@ -188,27 +194,30 @@
 	    (string-to-int (file-name-nondirectory path)))))))
 
 (deffoo nnml-request-group (group &optional server dont-check)
-  (cond
-   ((not (nnml-possibly-change-directory group server))
-    (nnheader-report 'nnml "Invalid group (no such directory)"))
-   ((not (file-exists-p nnml-current-directory))
-    (nnheader-report 'nnml "Directory %s does not exist"
-		     nnml-current-directory))
-   ((not (file-directory-p nnml-current-directory))
-    (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
-   (dont-check
-    (nnheader-report 'nnml "Group %s selected" group)
-    t)
-   (t
-    (nnheader-re-read-dir nnml-current-directory)
-    (nnmail-activate 'nnml)
-    (let ((active (nth 1 (assoc group nnml-group-alist))))
-      (if (not active)
-	  (nnheader-report 'nnml "No such group: %s" group)
-	(nnheader-report 'nnml "Selected group %s" group)
-	(nnheader-insert "211 %d %d %d %s\n"
-			 (max (1+ (- (cdr active) (car active))) 0)
-			 (car active) (cdr active) group))))))
+  ;; 1997/8/12 by MORIOKA Tomohiko
+  ;;	for XEmacs/mule.
+  (let ((pathname-coding-system 'binary))
+    (cond
+     ((not (nnml-possibly-change-directory group server))
+      (nnheader-report 'nnml "Invalid group (no such directory)"))
+     ((not (file-exists-p nnml-current-directory))
+      (nnheader-report 'nnml "Directory %s does not exist"
+		       nnml-current-directory))
+     ((not (file-directory-p nnml-current-directory))
+      (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
+     (dont-check
+      (nnheader-report 'nnml "Group %s selected" group)
+      t)
+     (t
+      (nnheader-re-read-dir nnml-current-directory)
+      (nnmail-activate 'nnml)
+      (let ((active (nth 1 (assoc group nnml-group-alist))))
+	(if (not active)
+	    (nnheader-report 'nnml "No such group: %s" group)
+	  (nnheader-report 'nnml "Selected group %s" group)
+	  (nnheader-insert "211 %d %d %d %s\n"
+			   (max (1+ (- (cdr active) (car active))) 0)
+			   (car active) (cdr active) group)))))))
 
 (deffoo nnml-request-scan (&optional group server)
   (setq nnml-article-file-alist nil)
@@ -236,7 +245,12 @@
 
 (deffoo nnml-request-list (&optional server)
   (save-excursion
-    (nnmail-find-file nnml-active-file)
+    ;; 1997/8/12 by MORIOKA Tomohiko
+    ;;	for XEmacs/mule.
+    (let ((nnmail-file-coding-system nnmail-active-file-coding-system)
+	  (pathname-coding-system 'binary)) ; for XEmacs/mule
+      (nnmail-find-file nnml-active-file)
+      )
     (setq nnml-group-alist (nnmail-get-active))
     t))
 
@@ -540,7 +554,10 @@
     (nnml-open-server server))
   (if (not group)
       t
-    (let ((pathname (nnmail-group-pathname group nnml-directory)))
+    (let ((pathname (nnmail-group-pathname group nnml-directory))
+	  ;; 1997/8/14 by MORIOKA Tomohiko
+	  ;;	for XEmacs/mule.
+	  (pathname-coding-system 'binary))
       (when (not (equal pathname nnml-current-directory))
 	(setq nnml-current-directory pathname
 	      nnml-current-group group
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nnspool.el lisp/nnspool.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nnspool.el	Thu Apr 17 06:58:25 1997
+++ lisp/nnspool.el	Fri Aug 15 09:51:07 1997
@@ -82,6 +82,10 @@
 (defvoo nnspool-rejected-article-hook nil
   "*A hook that will be run when an article has been rejected by the server.")
 
+;; 1997/8/14 by MORIOKA Tomohiko
+(defvoo nnspool-file-coding-system nnheader-file-coding-system
+  "Coding system for nnspool.")
+
 
 
 (defconst nnspool-version "nnspool 2.0"
@@ -109,6 +113,9 @@
 	     (default-directory nnspool-current-directory)
 	     (do-message (and (numberp nnspool-large-newsgroup)
 			      (> number nnspool-large-newsgroup)))
+	     ;; 1997/8/14 by MORIOKA Tomohiko
+	     ;;   for Win32
+	     (nnheader-file-coding-system nnspool-file-coding-system)
 	     file beg article ag)
 	(if (and (numberp (car articles))
 		 (nnspool-retrieve-headers-with-nov articles fetch-old))
@@ -349,6 +356,9 @@
     (let ((nov (nnheader-group-pathname
 		nnspool-current-group nnspool-nov-directory ".overview"))
 	  (arts articles)
+	  ;; 1997/8/14 by MORIOKA Tomohiko
+	  ;;   for Win32
+      	  (nnheader-file-coding-system nnspool-file-coding-system)
 	  last)
       (if (not (file-exists-p nov))
 	  ()
@@ -430,7 +440,11 @@
   (set-buffer nntp-server-buffer)
   (erase-buffer)
   (condition-case ()
-      (progn (nnheader-insert-file-contents file) t)
+      ;; 1997/8/14 by MORIOKA Tomohiko
+      ;;   for Win32
+      (let ((nnheader-file-coding-system nnspool-file-coding-system))
+	(nnheader-insert-file-contents file)
+	t)
     (file-error nil)))
 
 (defun nnspool-possibly-change-directory (group)
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/nntp.el lisp/nntp.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/nntp.el	Thu Apr 17 06:58:33 1997
+++ lisp/nntp.el	Fri Aug 15 09:51:07 1997
@@ -142,6 +142,10 @@
 (defvoo nntp-warn-about-losing-connection t
   "*If non-nil, beep when a server closes connection.")
 
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defvoo nntp-coding-system-for-read nil
+  "*coding-system for read from NNTP.")
+
 
 
 ;;; Internal variables.
@@ -736,7 +740,9 @@
   (let* ((pbuffer (nntp-make-process-buffer buffer))
 	 (process
 	  (condition-case ()
-	      (funcall nntp-open-connection-function pbuffer)
+	      ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+	      (let ((coding-system-for-read nntp-coding-system-for-read))
+		(funcall nntp-open-connection-function pbuffer))
 	    (error nil)
 	    (quit nil))))
     (when process
diff -ruN --exclude=*~ --exclude=*.elc --exclude=*.orig --exclude=Makefile --exclude=lpath.el --exclude=dgnushack.el --exclude=*.rej /usr/local/share/emacs/20.0.93/lisp/gnus/pop3.el lisp/pop3.el
--- /usr/local/share/emacs/20.0.93/lisp/gnus/pop3.el	Thu Apr 17 06:58:52 1997
+++ lisp/pop3.el	Fri Aug 15 09:51:07 1997
@@ -60,6 +60,9 @@
   "Timestamp returned when initially connected to the POP server.
 Used for APOP authentication.")
 
+(defvar pop3-movemail-file-coding-system nil
+  "Crashbox made by pop3-movemail with this coding system.")
+
 (defvar pop3-read-point nil)
 (defvar pop3-debug nil)
 
@@ -85,7 +88,8 @@
       (pop3-retr process n crashbuf)
       (save-excursion
 	(set-buffer crashbuf)
-	(append-to-file (point-min) (point-max) crashbox)
+	(let ((coding-system-for-write pop3-movemail-file-coding-system))
+	  (append-to-file (point-min) (point-max) crashbox))
 	(set-buffer (process-buffer process))
 	(while (> (buffer-size) 5000)
 	  (goto-char (point-min))
