* Can emacs pick proper coding system intelligently?
@ 2008-04-28 0:04 Scott Heftler
2008-04-28 1:04 ` Barry Margolin
2008-04-28 3:20 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Scott Heftler @ 2008-04-28 0:04 UTC (permalink / raw)
To: help-gnu-emacs
Yesterday I have a problem. I would read a RMAIL-mode file saved via
`gnus-summary-save-in-rmail' and the ellipses would be escape-quoted
and display as \205.
I was told that I needed to find the file using windows-1252 as my
coding system. Now the windows-1252 ellipses display nicely when I
run `universal-coding-system-argument' (C-x RET c windows-1252) before
finding the file.
You'd think that, when emacs encounters these \205s, it would KNOW to
pick windows-1252. But it doesn't. I put these in my init file to
help it along:
(prefer-coding-system 'windows-1252)
(prefer-coding-system 'utf-8)
This makes sure utf-8 is top pick, and windows-1252 is second. This
did nothing.
Is there no way to AUTOMATE emacs' pick of coding system? I thought
it chose coding systems intelligently, based on file contents? Do I
really have to open a file, see escape-quoted characters, guess what
coding system I should use, close the file, and then reopen it using
`C-x RET c' in a trial-and-error fashion?
-- Scott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can emacs pick proper coding system intelligently?
2008-04-28 0:04 Can emacs pick proper coding system intelligently? Scott Heftler
@ 2008-04-28 1:04 ` Barry Margolin
2008-04-28 2:40 ` Scott Heftler
2008-04-28 3:20 ` Eli Zaretskii
1 sibling, 1 reply; 4+ messages in thread
From: Barry Margolin @ 2008-04-28 1:04 UTC (permalink / raw)
To: help-gnu-emacs
In article <m2mynekfox.fsf@mac.com>,
Scott Heftler <lovecraftian@mac.com> wrote:
> You'd think that, when emacs encounters these \205s, it would KNOW to
> pick windows-1252.
How would it know that. \205 is not unique to that coding system, it
exists in many different coding systems.
Think of it like Paint By Numbers. The coding system is the translation
from numbers to colors. You can't just look at a picture, and know
which translation scheme to use just because it contains the number 10.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can emacs pick proper coding system intelligently?
2008-04-28 1:04 ` Barry Margolin
@ 2008-04-28 2:40 ` Scott Heftler
0 siblings, 0 replies; 4+ messages in thread
From: Scott Heftler @ 2008-04-28 2:40 UTC (permalink / raw)
To: help-gnu-emacs
Wait a minute! I forgot to mention that, when the article was first
loaded from usenet, it looked perfect -- there WERE no escaped
characters. Only after saving and then re-opening did these post-127
chars get escaped. Why can't gnus/emacs save the RMAIL file with some
kind of "open-me-with-coding-system"-type info?
--
Scott Heftler
psyche@mail.utexas.edu
Man muß mit den Wölfen heulen.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can emacs pick proper coding system intelligently?
2008-04-28 0:04 Can emacs pick proper coding system intelligently? Scott Heftler
2008-04-28 1:04 ` Barry Margolin
@ 2008-04-28 3:20 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2008-04-28 3:20 UTC (permalink / raw)
To: help-gnu-emacs
> From: Scott Heftler <lovecraftian@mac.com>
> Date: Sun, 27 Apr 2008 19:04:30 -0500
>
> Is there no way to AUTOMATE emacs' pick of coding system? I thought
> it chose coding systems intelligently, based on file contents?
It does when it can. Unfortunately, with 8-bit encodings, they are
too similar to distinguish between them reliably and efficiently.
However, if you have specific suggestions for improvements in this
area, please feel free to post them to emacs-devel@gnu.org.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-28 3:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 0:04 Can emacs pick proper coding system intelligently? Scott Heftler
2008-04-28 1:04 ` Barry Margolin
2008-04-28 2:40 ` Scott Heftler
2008-04-28 3:20 ` Eli Zaretskii
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).