From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: auto-detecting encoding for XML Date: Mon, 20 May 2002 07:48:27 +0300 (IDT) Sender: emacs-devel-admin@gnu.org Message-ID: References: <1021775271.29752.2282.camel@space-ghost> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1021870281 30540 127.0.0.1 (20 May 2002 04:51:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 04:51:21 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179f8j-0007wT-00 for ; Mon, 20 May 2002 06:51:21 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179fMV-0004CB-00 for ; Mon, 20 May 2002 07:05:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179f8q-0004SS-00; Mon, 20 May 2002 00:51:28 -0400 Original-Received: from is.elta.co.il ([199.203.121.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179f7f-0004Ql-00; Mon, 20 May 2002 00:50:16 -0400 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id HAA23946; Mon, 20 May 2002 07:48:28 +0300 (IDT) X-Sender: eliz@is Original-To: Colin Walters In-Reply-To: <1021775271.29752.2282.camel@space-ghost> Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4155 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4155 On 18 May 2002, Colin Walters wrote: > + (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t) > + (let ((match (downcase (match-string 1)))) > + ;; FIXME: what other encodings are valid, and how can we > + ;; translate them to the names of coding systems? > + (cond ((string= match "utf-8") > + 'utf-8) > + ((string-match "iso-8859-[[:digit:]]+" match) > + (intern match)) > + (t nil))) Why didn't you use `intern' in all cases? If you are bothered by the possibility that the resulting symbol is not a valid coding system, you can check that with coding-system-p. Btw, does this change honor "C-x RET c"?