求助贴,ubuntu,emacs,文件路径中的中文都显示乱码,或者每个中文字都变成了3个阿拉伯数字

如题,ubuntu,emacs,文件路径中的中文都显示乱码,或者每个中文字都变成了3个阿拉伯数字; 难道是要改系统的编码吗?

我在 macOS 上也遇到过。

(set-language-environment               "UTF-8")     ;; System default coding
(prefer-coding-system                   'utf-8)      ;; prefer
(set-buffer-file-coding-system          'utf-8-unix) ;;
(set-charset-priority                   'unicode)    ;;
(set-clipboard-coding-system            'utf-8-unix) ;; clipboard
(set-default-coding-systems             'utf-8)      ;; buffer/file: 打开文件时的默认编码
(set-file-name-coding-system            'utf-8-unix) ;; unix/linux/macos
(set-keyboard-coding-system             'utf-8-unix) ;; keyboard
(set-next-selection-coding-system       'utf-8-unix) ;; selection
(set-selection-coding-system            'utf-8)      ;; selection
(set-terminal-coding-system             'utf-8-unix) ;; terminal
(setq coding-system-for-read            'utf-8)      ;;
(setq default-buffer-file-coding-system 'utf-8)      ;;
(setq locale-coding-system              'utf-8)      ;; local

不知道到底是哪个起了作用,反正我一把梭了。 :laughing:

1 个赞

哈哈,我也去梭了一下,成功! :laughing: 谢谢! 有大佬来的话希望能解释一下