3

I use Emacs on both Linux and Windows to edit the same files (that I keep in Dropbox, which I hope is irrelevant, but who knows). The files are encoded in utf-8 with Unix line endings. Occasionally, I will notice that when editing them on Windows accented characters display incorrectly which I can correct by telling M-x recode-region that the file was really in utf-8 but was interpreted as iso-latin-1.

Why is Emacs incorrectly guessing my file is in iso-latin-1? Why does it only do that on Windows?

  • In order to get more details for troubleshooting you could perhaps visit the file literally, or in hexl-mode to find out if the characters in question are encoded as single byte or multi byte characters. Try M-x hexl-find-file. – Knut Forkalsrud May 24 '17 at 22:27
  • @KnutForkalsrud This mysteriously stopped happening a while ago. I don't think I could easily reproduce the environment I had when I had this problem. Thanks for the suggestion, though. If I ever experience this problem again, I'll try it. – Omar Jun 6 '17 at 16:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.