[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How does one disable (UTF-8?) input "fixup"?
From: |
Eli Zaretskii |
Subject: |
Re: How does one disable (UTF-8?) input "fixup"? |
Date: |
Mon, 11 Jan 2016 17:49:19 +0200 |
> From: Winston <wbe@UBEBLOCK.psr.com.invalid>
> Date: Mon, 11 Jan 2016 05:16:13 -0500
>
> What mode/variable controls text conversion/fixup when reading a file?
>
> I have a mostly ASCII text file that contains a few stray non-ASCII
> characters.
You need to prefix "C-x C-f" with "C-x RET c us-ascii RET". See the
node "Text Coding" in the Emacs manual.
Or use "M-x find-file-literally" to disable any conversions.
> However, if I rename the file "foo.exe", do "emacs foo.exe" and search,
> I see the original characters (no change).
Emacs by default visits binary files without any conversions.
> Curiously, after "emacs foo.exe", I did find-file-other-window to read
> in "foo", and the characters were NOT altered.
Because the file is already in an Emacs buffer, so Emacs doesn't
re-read it, it just reuses that buffer's contents.
> What controls whether that conversion is done or not? Is there an easy
> way to turn it on/off? I didn't see anything in the results from
> apropos "-mode" that looked relevant.
Text decoding is not a mode, it is a basic feature of any I/O Emacs
does.