I have files in Markdown, saved in a Dropbox folder. One of them replaces characters with angled bracket sequences. For example a git diff no-index
between the saved file and a copy-paste of the text to a new file gives:
-# `Package <81><B4>julia-mode-0.3<81><B4> is unavailable.`
+# `Package ´julia-mode-0.3´ is unavailable.`
Other sequences are <91><A1><AD>
for ellipsis (...
), <81><A0>
for a space, <81><E2>
for â
, <86><A4>
for the euro sign €
, <91><A1><B0>
for opening double quote, <91><A1><B1>
for closing double quote, <86><A1>
for opening single quote, <86><A2>
for closing single quote.
The variable buffer-file-coding-system
is emacs-mule-unix
in the original buffer and utf-8-unix
in the buffer with the copy-pasted content.
Many other files in the same folder have recently stopped showing with proper formatting. They list Fundamental
in the mode line instead of Markdown
. The characters display properly. Many of these buffers have a variable buffer-file-coding-system
of undecided-unix
.
As I started having these issues around the same time, I believe they are related. Since the characters display fine in Emacs, it's not a question of converting the buffer from one encoding to another (as many of the threads I have found).
How can I save all of these buffers back to utf8-unix
, and what triggered this behavior?
less myfile
)? What character set does thefile
command report (file myfile
in the shell)? – JeanPierre May 25 '19 at 6:01Cmd-A
,Cmd-C
,Cmd-V
on macOS.less myfile
shows the same thing: the first file asPackage <81><B4>julia-mode-0.3<81><B4> is unavailable.
and the second asPackage ´julia-mode-0.3´ is unavailable.
. Thefile
command reportsNon-ISO extended-ASCII text
for the first andLisp/Scheme program text, UTF-8 Unicode text
for the second. – miguelmorin May 28 '19 at 15:33