Reputation: 66
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
Upvotes: 2
Views: 366
Reputation: 66
Setting correct locale for a shell with these lines added to .zshenv
solves the issue.
set -a
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
set +a
Upvotes: 1
Reputation: 704
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
Upvotes: 2