How to solve the garbled problem when opening Emacs under Linux?

  

Emacs is recognized as one of the best code editors, and many users use Emacs on Linux. However, because the default encoding and the document encoding will cause Emacs to appear garbled frequently, let me introduce how to solve the garbled problem when opening Emacs under Linux.

Method 1:

Just C-x "RET" r (M-x revert-buffer-with-coding-system) to re-read this file with the specified encoding. Generally garbled is because of the use of latin or utf8 under emacs, and the open document is gb2312 code. If you don't remember the coding type, try it, basically gb2312 can solve it. Remember to use tabs to fill in the code is more convenient. Or you can view it by file file name or enca file name.

The choice here is gb18030-unix

Method 2:

Use unicad plugin to download unicad.el and save it to the appropriate directory (such as .mycs to configure my-elisp folder) To store the directory), then declare it in .emacs (require ‘unicad). This will automatically determine the encoding type the next time you open the document.

The above is the solution to open garbled Emacs under Linux. If you also encounter Emacs garbled problems, try the above method.

Copyright © Windows knowledge All Rights Reserved