1

Lately my documents dissolve into misinterpreted Unicode, for example α becomes \316\261. What could be the cause for that?

  • When you say "lately," do you mean that the same file was readable previously but is not readable now? What have you changed recently? – Dan Jul 5 '16 at 18:04
  • I just found out that it happens upon restarting Emacs. It might be related to Spacemacs. Perhaps I should just create a GitHub issue. – Lenar Hoyt Jul 5 '16 at 19:33
  • The standard way to handle this sort of question is to start Emacs without your init file (emacs -Q) and then recursively bisect your init file (ie, iteratively comment out half of it) until you find out what's causing the problem. – Dan Jul 5 '16 at 20:00
  • Outch, this even happens with emacs -Q and it happens only with this particular file. Perhaps some special character throws the encoding detection off course? – Lenar Hoyt Jul 5 '16 at 22:15
  • Other editors have no problem decoding the file. I will try to produce a minimal example. – Lenar Hoyt Jul 5 '16 at 22:16
1

Emacs uses some heuristic to guess the encoding of the file. In this case it fails. No problem, just let Emacs know that the file uses UTF-8 encoding. You can do that after visiting the file with C-x RET r or M-x revert-buffer-with-coding-system. See (info "(emacs) Specify Coding") for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.