Gnus development mailing list
 help / color / mirror / Atom feed
From: Shenghuo ZHU <zsh@cs.rochester.edu>
Subject: Re: Invalid coding in Win95
Date: 10 Jul 1999 19:27:55 -0400	[thread overview]
Message-ID: <2nk8s8rsp0.fsf@tiger.jia.vnet> (raw)
In-Reply-To: Michael Klingbeil's message of "10 Jul 1999 17:14:06 +0200"

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

>>>>> "MK" == Michael Klingbeil <mklingbeil@knuut.de> writes:

MK> I have this Error?
MK> Invalid coding-system (raw-text-dos), using 'undecided
MK> In .gnus is:
MK> (setenv "MM_CHARSET" "iso-8859-1")

I guess you did not use xemacs+mule. Anyway, here is the patch for
guessing coding-system more safely.

1999-07-10  Shenghuo ZHU  <zsh@cs.rochester.edu>

	* mm-util.el (mm-running-xemacs): Removed.
	(mm-coding-system-p): New function.
	(mm-binary-coding-system): Safe guess.
	(mm-text-coding-system): Ditto.
	(mm-auto-save-coding-system): Ditto.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 95-zsh1.diff --]
[-- Type: text/x-patch, Size: 2143 bytes --]

--- mm-util.el	1999/07/10 22:52:26	1.1
+++ mm-util.el	1999/07/10 23:11:50
@@ -24,19 +24,6 @@
 
 ;;; Code:
 
-(defconst mm-running-xemacs (string-match "XEmacs" emacs-version))
-
-(defconst mm-binary-coding-system
-  (if mm-running-xemacs
-      'binary 'no-conversion)
-  "100% binary coding system.")
-
-(defconst mm-text-coding-system
-  (and (fboundp 'coding-system-list)
-   (if (memq system-type '(windows-nt ms-dos ms-windows))
-       'raw-text-dos 'raw-text))
-  "Text-safe coding system (For removing ^M).")
-
 (defvar mm-mime-mule-charset-alist
   '((us-ascii ascii)
     (iso-8859-1 latin-iso8859-1)
@@ -118,16 +105,34 @@
     (x-ctext . ctext))
   "A mapping from invalid charset names to the real charset names.")
 
-(defconst mm-auto-save-coding-system
+(defun mm-coding-system-p (sym)
+  "Return non-nil if SYM is a coding system."
+  (or (and (fboundp 'coding-system-p) (coding-system-p sym))
+      (memq sym (mm-get-coding-system-list))))
+
+(defvar mm-binary-coding-system
   (cond 
-   ((memq 'emacs-mule (mm-get-coding-system-list))
-    (if (memq system-type '(windows-nt ms-dos ms-windows))
-	'emacs-mule-dos 'emacs-mule))
-   ((memq 'escape-quoted (mm-get-coding-system-list))
-    'escape-quoted)
-   ((memq 'no-conversion (mm-get-coding-system-list))
-    'no-conversion)
+   ((mm-coding-system-p 'no-conversion) 'no-conversion)
+   ((mm-coding-system-p 'binary) 'binary)
    (t nil))
+  "100% binary coding system.")
+
+(defvar mm-text-coding-system
+  (or (if (memq system-type '(windows-nt ms-dos ms-windows))
+	  (and (mm-coding-system-p 'raw-text-dos) 'raw-text-dos)
+	(and (mm-coding-system-p 'raw-text) 'raw-text))
+      mm-binary-coding-system)
+  "Text-safe coding system (For removing ^M).")
+
+(defvar mm-auto-save-coding-system
+  (cond 
+   ((mm-coding-system-p 'emacs-mule)
+    (if (memq system-type '(windows-nt ms-dos ms-windows))
+	(if (mm-coding-system-p 'emacs-mule-dos) 
+	    'emacs-mule-dos mm-binary-coding-system)
+      'emacs-mule))
+   ((mm-coding-system-p 'escape-quoted) 'escape-quoted)
+   (t mm-binary-coding-system))
   "Coding system of auto save file.")
 
 ;;; Internal variables:

[-- Attachment #3: Type: text/plain, Size: 19 bytes --]



-- 
Shenghuo ZHU

  reply	other threads:[~1999-07-10 23:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-10 15:14 Michael Klingbeil
1999-07-10 23:27 ` Shenghuo ZHU [this message]
1999-07-11  7:54   ` Michael Klingbeil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2nk8s8rsp0.fsf@tiger.jia.vnet \
    --to=zsh@cs.rochester.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).