2

I can't copy Non-ASCII charaters from Neovim anymore when I select them with mouse or crtl + v.

For example, I have the Turkish word Bankası written in my editor. When I yank and paste it to somewhere else, what I see is Bankasƒ±.

In my nvimrc I only have:

if has('mouse')
  set mouse=a
end
set clipboard=unnamed

I have tried setting

  1. mouse=r
  2. mouse=v
  3. clipboard=unnamedplus

but no luck and I can't seem to remember what's changed. Any idea how to fix this?

Additional info for comments:

how do you copy exactly? What clipboard provider are you using? Have you tried a different one?

I have tried both yy and cmdc.

Healthcheck does tell me, I use pbcopy and all is OK.

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

No, I haven't tried anything else. I didn't know there was such an option other than pbcopy.

Can you check the encoding settings of all apps? Is the character double-width in some way?

Other apps work fine. I can copy from VS Code to any other app just fine.

I don't know if it is double-width or not. It's a standard Turkish char that didn't cause any problems before.

ogirginc
  • 345
  • 3
  • 11

1 Answers1

1

Solution

Setting LANG to tr_TR.UTF-8 did solve the issue.

export LANG=tr_TR.UTF-8

Problem

Turns out LANG being empty was the root cause:

> locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

I only checked through AppleLocale

> defaults read -g AppleLocale
en_TR

and assumed en_TR is a valid. However locale -a doesn't list such a thing. Don't know why AppleLocale is set as en_TR neither. ‍♂️

ogirginc
  • 345
  • 3
  • 11