From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24132 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Invalid coding in Win95 Date: 10 Jul 1999 19:27:55 -0400 Organization: U of Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <2nk8s8rsp0.fsf@tiger.jia.vnet> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035161751 7052 80.91.224.250 (21 Oct 2002 00:55:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:55:51 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id TAA21715 for ; Sat, 10 Jul 1999 19:29:35 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id SAB29747; Sat, 10 Jul 1999 18:28:50 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 10 Jul 1999 18:29:04 -0500 (CDT) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id SAA00701 for ; Sat, 10 Jul 1999 18:28:50 -0500 (CDT) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id TAA21695 for ; Sat, 10 Jul 1999 19:27:16 -0400 (EDT) Original-Received: from heart.cs.rochester.edu (heart.cs.rochester.edu [192.5.53.109]) by cayuga.cs.rochester.edu (8.9.3/Q) with ESMTP id TAA24716 for ; Sat, 10 Jul 1999 19:26:51 -0400 (EDT) Original-Received: (from zsh@localhost) by heart.cs.rochester.edu (8.9.3/8.9.3) id TAA01791; Sat, 10 Jul 1999 19:27:56 -0400 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Michael Klingbeil's message of "10 Jul 1999 17:14:06 +0200" Original-Lines: 24 User-Agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) XEmacs/21.2 (Chiyoda) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24132 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24132 --=-=-= >>>>> "MK" == Michael Klingbeil 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 * 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=95-zsh1.diff --- 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: --=-=-= -- Shenghuo ZHU --=-=-=--