[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] Processing chars above \200
From: |
Eli Zaretskii |
Subject: |
Re: [h-e-w] Processing chars above \200 |
Date: |
Mon, 24 Sep 2018 16:50:18 +0300 |
> Date: Mon, 24 Sep 2018 09:04:14 -0400
> From: John J. Xenakis <address@hidden>
> Cc: address@hidden
>
> OK, it looks like the null byte was the major problem. That resolves
> some mysteries like why the file looked ok in Notepad -- which
> presumably just deletes null bytes.
I'm glad we have that figured out.
> Since a null byte has such huge consequences, one thing you might
> consider is displaying a message, "Your file contains null bytes,"
> when such a file is loaded, or a string with a null byte is pasted.
It might be a good feature to add this, so I suggest to request it via
report-emacs-bug. However, one problem with such messages is that
they quickly go away, especially if there are other messages after
that.
In general, whenever the modeline shows "=" in the left corner,
meaning that the file was visited with no decoding, and you didn't
explicitly request that (e.g.by invoking find-file-literally), you
should immediately suspect null bytes and search for them with the
likes of "C-x C-q C-SPC".
> Anyway, thanks for all your help. It's a big relief to have this
> problem resolved.
You are welcome.
My suggestion to change the preferred encoding was because even after
removing the null byte, Emacs didn't decode the non-ASCII characters
correctly. But maybe that's because my Windows locale is different
from yours.