Windows 下用 Emacs,粘贴内容显示乱码

如图,我就是用 C-y 粘贴上去的。

微信截图_20210425192811

这个问题挺奇怪的,之前用 Mac 不会这样的。

可以试下我的配置:

;; 解决粘贴中文出现乱码的问题
(if (eq system-type 'windows-nt)
	(progn
	  ;; (setq selection-coding-system 'utf-16le-dos) ;; 修复从网页剪切文本过来时显示 \nnn \nnn 的问题
	  ;; (set-default selection-coding-system 'utf-16le-dos)
	  (set-selection-coding-system 'utf-16le-dos) ;; 别名set-clipboard-coding-system
	  )
  (set-selection-coding-system 'utf-8))
2 个赞

好的,我试一试,先谢谢!

谢谢,管用,没问题了