2

I'm trying to paste accented characters (eg: á, é, í) into Emacs but here's what I get:

accents pasted into emacs
When I paste into some other editor, like Vim, it works fine. I already tried putting this in my init.el

(setq utf-translate-cjk-mode nil)
(set-language-environment 'utf-8)
(set-keyboard-coding-system 'utf-8-unix)
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-clipboard-coding-system 'utf-8)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

but didn't seem to help. Any ideas?

EDIT: Forgot to mention, my OS is Arch Linux and the system encoding is also UTF-8.

EDIT2: Firstly I thought this was an encoding problem, but I found it's actually related to evil-mode. This only happens when I'm using "+p of evil

Jesse
  • 1,449
  • 2
  • 15
  • 20
  • The only other thing I have is: `(setq-default buffer-file-coding-system 'utf-8-unix)` I also use: `(add-to-list 'file-coding-system-alist '("\\.tex" . utf-8-unix) )` for each file extension that I normally use. – lawlist Aug 27 '14 at 04:01
  • 2
    Please give some details of how you copy&paste. E.g. are you running inside a terminal emulator? – Stefan Aug 27 '14 at 05:13
  • @Stefan I found out it's related to evil mode. Emacs `C-y` pastes normal, the problem seems to be in `"+p` of evil. I'll add this to my question – Jesse Aug 29 '14 at 17:18
  • What about pasting into X-enabled emacs with the middle mouse button click? It bugs me big time, although pasting with `C-y` is fine. – Alexander Shcheblikin Feb 06 '15 at 01:47
  • Possible duplicate of [Emacs encoding of pasted text](https://stackoverflow.com/questions/22647517/emacs-encoding-of-pasted-text) – rofrol Aug 02 '18 at 18:37
  • I have this issue only when Simpleclip is on. I need to turn it off then on again whenever my clipboard contains non ascii chars. :( – Henry Mazza Sep 17 '20 at 12:46

0 Answers0