From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8) Date: Tue, 19 Feb 2008 16:17:36 +0900 Message-ID: <8763wlxvn3.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87odaifv16.fsf@mundaneum.com> <87r6fd5q12.fsf@uwakimon.sk.tsukuba.ac.jp> <47B6B3CC.1080101@gnu.org> <87wsp5xhz4.fsf@uwakimon.sk.tsukuba.ac.jp> <47B6D1ED.6020601@gmail.com> <87r6fcxms7.fsf@uwakimon.sk.tsukuba.ac.jp> <47B8452F.6090504@gmail.com> <87odafxluc.fsf@uwakimon.sk.tsukuba.ac.jp> <87bq6fnrpt.fsf@catnip.gol.com> <87hcg7xh2h.fsf@uwakimon.sk.tsukuba.ac.jp> <87ablyye32.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203405063 4208 80.91.229.12 (19 Feb 2008 07:11:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Feb 2008 07:11:03 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, "Lennart Borgman \(gmail\)" , Edward O'Connor , Stefan Monnier , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 19 08:11:26 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JRMdR-0008Cu-TK for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2008 08:11:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRMcx-00042k-7d for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2008 02:10:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRMco-0003uI-3E for emacs-devel@gnu.org; Tue, 19 Feb 2008 02:10:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRMcl-0003s5-CS for emacs-devel@gnu.org; Tue, 19 Feb 2008 02:10:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRMck-0003rf-Qk for emacs-devel@gnu.org; Tue, 19 Feb 2008 02:10:42 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRMck-0008KM-Cz for emacs-devel@gnu.org; Tue, 19 Feb 2008 02:10:42 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JRMcj-0003WP-Ar for emacs-pretest-bug@gnu.org; Tue, 19 Feb 2008 02:10:41 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JRMcd-0008Il-Rl for emacs-pretest-bug@gnu.org; Tue, 19 Feb 2008 02:10:38 -0500 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRMcd-0008I3-5h; Tue, 19 Feb 2008 02:10:35 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 56CDE7FFA; Tue, 19 Feb 2008 16:10:31 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 5E0281A29E5; Tue, 19 Feb 2008 16:17:37 +0900 (JST) In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" 42711a251efd XEmacs Lucid X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89545 gmane.emacs.pretest.bugs:21211 Archived-At: Miles Bader writes: > "Stephen J. Turnbull" writes: > > Do the same thing at visit time by default. It's not like the > > implementation would differ, it's just it would be a post-visit hook > > instead of a pre-save hook. > > That isn't going to fly. What are willing to put up with when > saving a file is very different from what they're willing to put up > when visiting one. Oh, I think it will indeed fly. First of all, there will be an Emacsy "the-user-is-always-right flag"; we're discussing the default here, which IMO should lean heavily to standard conformance and protecting the user from automatic decisions they may not understand. > I think maybe you misunderstood my proposal. I missed the detail that you planned to hamstring `prefer-coding-system', yes. That's really minor though, in view of the fundamental disagreement. My position is that XML has a perfectly acceptable in-band way to announce encodings. Contrary to what I understood Stefan to be saying, it is per-file and required by the standard.[1] This gives strong reason to believe that most users will be happy to add text declarations, especially in free software where they'll be using high-quality XML implementations. Furthermore, my position is that in the event that the user chooses not to use an XML text declaration to declare the encoding, use of Mule detection mechanisms (including coding: cookies) is just asking for trouble, because they impose risks both of giving Unicode to users who want a legacy encoding and of giving a legacy encoding to users who want Unicode. The fact that your proposal produces buffers that *look* like text even though they *are* gibberish according to the standard (or according to some nonconforming application!) is in no way a point in its favor! Of course, Mule's well-tuned detection facilities should be used to *advise* the user about what encoding is in the buffer, and therefore what to put in the text declaration or some out of band means of declaring the encoding. But in the absence of explicit declaration (including setting the Emacs-I-dont-need-none-o-yer-XML-lip flag to t) by the user, the user should be asked to confirm the encoding. Footnotes: [1] http://www.w3.org/TR/REC-xml/#sec-TextDecl for the definition; loc. cit. #charencoding for the "MUST".