emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying bytes (was: Inadequate documentation of silly characters


From: Per Starbäck
Subject: Re: Displaying bytes (was: Inadequate documentation of silly characters on screen.)
Date: Mon, 23 Nov 2009 22:34:18 +0100

2009/11/23 Richard Stallman <address@hidden>:
> What are the situations where a user is likely to see these stray
> bytes.  When visiting a binary file, of course; but in that situation,
> nobody will be surprised or disappointed.  So what are the other
> cases,

Sometimes when Emacs can't guess the coding system.

$ od -c euro.txt
0000000   T   h   a   t       c   o   s   t   s     200   1   7   .  \n
0000020
$ emacs euro.txt

This is really a windows-1252 file and the strange character is
supposed to be a Euro sign.
For me, with no particular setup to make Emacs expect windows-1252
files that shows in emacs as
"That costs \20017." with raw-text-unix.

> and what might the user really want instead?  Does it mean the
> user probably wants to do M-x decode-coding-region?  If so, can we find a way
> to give the user that hint?

In that case revert-buffer-with-coding-system. Ideally I'd like Emacs
to ask directly when opening the file
in such a case, if it can't determine anything better than raw-bytes.
At least if the mode (like text-mode here)
indicates that it shouldn't be a binary file.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]