Changing file encoding in emacs

Posted on Sept. 7, 2024 by Ben Dickson.


Occasionally files will come in with the wrong encoding detected, this can be corrected with: M-x revert-buffer-with-coding-system then enter dos (for example)

Then to convert to another encoding, M-x set-buffer-coding-system and enter unix

There is, shockingly for emacs, keyboard shortcuts for these - but I use them so rarely and the shortcuts are slightly esoteric even by emacs standards: