unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: Edward O'Connor <hober0@gmail.com>,
	emacs-pretest-bug@gnu.org,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8)
Date: Sat, 16 Feb 2008 20:23:43 +0900	[thread overview]
Message-ID: <87wsp5xhz4.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <47B6B3CC.1080101@gnu.org>

Jason Rumney writes:
 > Stephen J. Turnbull wrote:
 > > Stefan Monnier writes:

 > > > [Typically this user is dealing with a fragment of a larger
 > > > document, not the whole document.]

 > > Man, don't go there.  XML documents *and fragments* should be presumed
 > > Unicode until the user explictly says otherwise.

 > I think you're misunderstanding.

No, I'm not.  Look at the subject.

 > Currently we use utf-8 in absense of a coding tag, even if it
 > causes a decoding error.

Signaling an error in this situation is appropriate.  Guessing what is
meant (eg, by falling back to undecided) is not.  It's quite possible
that the user is unintentionally in a Latin-1 environment and would
thank you if you reminded them that they should save in UTF-8.

 > And when the user explicitly sets the file-coding-system to
 > latin-1, we ignore it and save as utf-8.

PSGML and nXML were both written by James Clark; if they try to
enforce Unicode, I'd suggest that maybe somebody who knows more about
XML than all of us put together made that decision.

Of course in the end the users have reasons whereof OASIS does not
know, so that there must be escapes for users with legacy documents,
or with legacy document standards.  But users should be strongly
encouraged to use XML mechanisms, *not* those of Mule, to cope.  Mule
is designed to cope with environments where there are few rules and
those are poorly understood by programmers and users alike.  XML is
about having good rules, well understood by programmers (especially of
the UI) so that users don't have to.

PSGML and AUCTeX, at least, provide methods by which a master document
can be associated with a document fragment which provides various
kinds of context for the fragment -- it's not rocket science.  I would
imagine that nXML does too.  So, for example, upon detecting a coding
conflict, Emacs could offer to (1) insert an appropriate processing
instruction, or (2) associate the current fragment with an existing
master document via file locals, or (3) associate the fragment with a
dummy master document that lives entirely in Customize.  Those
documents could provide other context too, such as importing DTDs and
entities.







  reply	other threads:[~2008-02-16 11:23 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15  9:06 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8) Sébastien Vauban
2008-02-15 22:32 ` Edward O'Connor
2008-02-15 22:54   ` Jason Rumney
2008-02-15 23:24     ` Miles Bader
2008-02-15 23:34       ` Jason Rumney
2008-02-15 23:42         ` Miles Bader
2008-02-16  3:42           ` Miles Bader
2008-02-18  2:49       ` Jason Rumney
2008-02-18  3:01         ` Jason Rumney
2008-02-16  4:03   ` Stefan Monnier
2008-02-16  7:17     ` Stephen J. Turnbull
2008-02-16  9:58       ` Jason Rumney
2008-02-16 11:23         ` Stephen J. Turnbull [this message]
2008-02-16 12:07           ` Lennart Borgman (gmail)
2008-02-17  3:52             ` Stephen J. Turnbull
2008-02-17 14:31               ` Lennart Borgman (gmail)
2008-02-17 22:24                 ` Stephen J. Turnbull
2008-02-17 22:27                   ` Miles Bader
2008-02-18  0:07                     ` Stephen J. Turnbull
2008-02-18  3:16                       ` Miles Bader
2008-02-18  6:26                         ` Stephen J. Turnbull
2008-02-18  6:40                           ` Miles Bader
2008-02-19  7:17                             ` Stephen J. Turnbull
2008-02-19  7:19                               ` Miles Bader
2008-02-19 21:03                                 ` Stephen J. Turnbull
2008-02-19 22:47                                   ` Jason Rumney
2008-02-19 22:58                                   ` Miles Bader
2008-02-20  0:43                                     ` Stephen J. Turnbull
2008-02-19 15:50                               ` Stefan Monnier
2008-02-19 22:02                                 ` Stephen J. Turnbull
2008-02-18 14:59                           ` Projects and multi-file documents (was: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8)) Stefan Monnier
2008-02-18 18:51                             ` Projects and multi-file documents Ralf Angeli
2008-02-18 16:35                   ` 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8) Lennart Borgman (gmail)
2008-02-16 17:03           ` Jason Rumney
2008-02-16 17:31             ` David Kastrup
2008-02-17  3:53             ` Stephen J. Turnbull
2008-02-18  3:22               ` Miles Bader
2008-02-18  6:01                 ` Stephen J. Turnbull

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87wsp5xhz4.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=hober0@gmail.com \
    --cc=jasonr@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).