Open kud1ing opened 6 years ago
Indeed, in nvim I think the process output is utf8 (i.e. the win32yank input) - in your case I would assume it is utf16.
Maybe we can use OsString for that read in https://github.com/equalsraf/win32yank/blob/master/src/main.rs#L127
It is a bit trickier than that. These are the cases I am aware of
First, the one you mentioned happens because ö
uses whichever codepage the console is using. It is possible to decode this by checking the current encoding used by the console
echo ö|win32yank –i
However it this could also fail if the data actually comes from a file. There is nothing we can do in this case for detection - it all depends on the file encoding.
cat test2.txt|win32yank –i
Colleagues have this issue when win32yank is called by NeoVim.
I assume this is possible if the fileencoding is not utf8. Perhaps the easiest way is to force encode as utf8 on the nvim side (assuming this is correct).
On a German Windows this
gives something like
A colleague has this issue when win32yank is called by NeoVim.