Vim. Can't yank non-eng chars to system clipboard
When I yank russian characters, say тест
, to system clipboard ("+y) and then paste it in a shell or a browser I get this —Ç–µ—Å—Ç
. How to fix this?
Vim
:set encoding?
encoding=utf-8
:set fileencoding
fileencoding=utf-8
Shell
echo $LC_CTYPE
UTF-8
I had the same issue and fixed it by adding lang en_US.UTF-8
to my ~/.config/nvim/init.vim
(using Neovim). You could try adding that to your ~/.vimrc
.
Source: https://github.com/neovim/neovim/issues/5683#issuecomment-420833679