wincent/ferret

Ferret fails to search string using non ascii character

vds2212 opened this issue · 3 comments

Dear Ferret,

Context

I'm using vim 8.2 on Windows 10 using rg.exe

I use utf8 encoding for the user interface of vim

set encoding=utf-8

Problem

It seems that when searching string with non-ascii code Ferret fails to find them

:Ack α

Solution

I have slightly modified the code of Ferret to convert the search string Ferret pass to rg to escape the non-ascii code using the \uxxxx syntax.

I'm glad to create a Pull request if you feel interested to review my code.

Best regards,
Vivian.

I'd be happy to look at a PR, but interestingly, this doesn't seem to repro on Neovim + macOS with encoding=utf-8. I wonder if it's a Vim-only problem, or a Windows-only one... 🤔

Thanks for you answer. I'll make a neovim test and I'll let you know.

Please ignore the issue.

I believe the problem is that the encoding of my file is latin-1 where rg assumed utf8.

My proposal do not address the problem :-|

Best regards,
Vivian.