[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.60; Defaut encoding for XML files should be undefined (instead
From: |
Miles Bader |
Subject: |
Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8) |
Date: |
Mon, 18 Feb 2008 15:40:20 +0900 |
"Stephen J. Turnbull" <address@hidden> writes:
> > The discussion is about what to do when visiting a file, not saving
> > it.
>
> 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. [It might be useful as an configurable _option_, of course, for
those people who need it.]
> > For visiting, I rather like what I suggested earlier, changing Emacs'
> > format-specific-coding mechanisms to support format-specific coding
> > _preferences_ as well as "absolute codings".
>
> IMO, users who know enough about coding systems and the various
> formats to use such a facility would be just as happy to use
> `file-coding-system-alist'. Learning about it will be a burden for
> the "naive" users who want things to "just work". And maintaining a
> database of defaults will be a burden on maintainers disproportionate
> to the benefit.
I think maybe you misunderstood my proposal.
Emacs currently, for xml and related files, has various mechanisms that
_force_ the encoding to be utf-8 when reading (visiting) the file. [If
the file has no coding: tag.]
I'm suggesting these mechanisms have the ability to be "softer", so that
instead of forcing the encoding to utf-8, utf-8 is merely pushed to the
front of the coding priority list for coding recognition, as if by the
`prefer-coding-system' function (while reading that file), and Emacs'
normal automagic recognition allowed to do its stuff. This "preference"
is _not_ set by the user, but rather by the same emacs magic that
currently sets an "absolute" utf-8 coding [on non-tagged files].
That would mean that "proper" xml files would continue to work just as
now, using utf-8 (with no danger of being screwed up due to the user's
language environment), but that "improper" xml files would stand a much
better chance of showing up in the user's buffer as something readable
rather than gibberish. [This doesn't guarantee that other apps will do
the right thing of course -- though in the case being discussed, the
would have -- but while in Emacs, things tend to make a lot more sense
if the file was read as something reasonable.]
-Miles
--
Consult, v.i. To seek another's disapproval of a course already decided on.
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), (continued)
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Jason Rumney, 2008/02/16
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/16
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Lennart Borgman (gmail), 2008/02/16
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/16
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Lennart Borgman (gmail), 2008/02/17
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/17
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Miles Bader, 2008/02/17
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/17
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Miles Bader, 2008/02/17
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/18
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8),
Miles Bader <=
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Miles Bader, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Jason Rumney, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Miles Bader, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stefan Monnier, 2008/02/19
- Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8), Stephen J. Turnbull, 2008/02/19
- 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
- Re: Projects and multi-file documents, Ralf Angeli, 2008/02/18