[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13505: Bug#696026: emacs24: file corruption on saving
From: |
Vincent Lefevre |
Subject: |
bug#13505: Bug#696026: emacs24: file corruption on saving |
Date: |
Mon, 21 Jan 2013 05:14:10 +0100 |
User-agent: |
Mutt/1.5.21-6290-vl-r57386 (2013-01-17) |
On 2013-01-21 05:48:14 +0200, Eli Zaretskii wrote:
> > You said:
> >
> > | The original encoded form of the characters as found on disk at
> > | visit time _cannot_ be recovered by saving with raw-text, because
> > | that encoded form is lost without a trace when the file is _visited_
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > | and decoded into the internal representation.
> >
> > This is what lossy is.
>
> In that sense, every encoding except no-conversion is lossy.
Even 8-bit encodings such as latin-1?
> > On the opposite, the utf-8 encoding doesn't seem to be lossy: Emacs
> > seems to handle files with invalid UTF-8 sequences without any loss.
> > So, this encoding is safe, even if Emacs wrongly guess the encoding.
>
> No, it isn't, although you could get away with it most of the time.
Could you give an example where one loses data with the utf-8 encoding?
> > But Emacs should clearly tell the user what to do after C-x C-s and
> > clearly say when there can be data loss.
>
> At save time, "data loss" is wrt what's in the buffer. In that sense,
> the encodings Emacs suggested don't lose any data.
"data loss" is the difference between the original file and the saved
file.
> > Then Emacs says: "Select one of the safe coding systems listed below
> > [...]", but doesn't say that something has already been lost. So, the
> > words "safe coding systems" are really misleading.
>
> It's misleading because you misunderstand what is "safe" at buffer
> save time.
No, it's misleading because Emacs didn't say that data were lost
when visiting the file.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
- bug#13505: Bug#696026: emacs24: file corruption on saving, Rob Browning, 2013/01/19
- bug#13505: Bug#696026: emacs24: file corruption on saving, Eli Zaretskii, 2013/01/20
- bug#13505: Bug#696026: emacs24: file corruption on saving, Rob Browning, 2013/01/20
- bug#13505: Bug#696026: emacs24: file corruption on saving, Glenn Morris, 2013/01/20
- bug#13505: Bug#696026: emacs24: file corruption on saving, Vincent Lefevre, 2013/01/20
- bug#13505: Bug#696026: emacs24: file corruption on saving, Eli Zaretskii, 2013/01/20
- bug#13505: Bug#696026: emacs24: file corruption on saving,
Vincent Lefevre <=
- bug#13505: Bug#696026: emacs24: file corruption on saving, Eli Zaretskii, 2013/01/21
- bug#13505: Bug#696026: emacs24: file corruption on saving, Vincent Lefevre, 2013/01/21
- bug#13505: Bug#696026: emacs24: file corruption on saving, Eli Zaretskii, 2013/01/22
bug#13505: Bug#696026: emacs24: file corruption on saving, Andreas Schwab, 2013/01/20