ArticleDirectory
- Configuration File
- Switch the encoding of the Current Buffer
Configuration File
Learn about Emacs. Because the encoding on Apple uses Unicode, configure the Emacs encoding to gb2312. I found some Chinese encoding information.
Emacs configuration file:
(Set-keyboard-coding-system 'cn-gb-2312)
(Set-selection-coding-system 'CN-gb-2312)
(Set-terminal-coding-system 'CN-gb-2312)
(Set-buffer-file-coding-system 'gb2312)
(Setq default-buffer-file-coding-system 'gb2312)
(Setq locale-coding-system 'gb2312)
(Set-language-environment-coding-systems "Chinese-GB" nil)
(Global-font-lock-mode t)
(Auto-image-file-mode t)
(PC-selection-mode)
Switch the encoding of the Current Buffer
C-x ret r can be used to change the encoding of the opened file. This is a very convenient function, but with unicad, this estimation will be used less.
Use C-x ret f to convert the encoding of the current file.