evil-winrm icon indicating copy to clipboard operation
evil-winrm copied to clipboard

add utf-8 and remove readline

Open alexxsstar opened this issue 1 year ago • 1 comments

Describe the purpose of the pull request

The Ruby function Readline.readline cannot work with utf-8 encoding (to be honest, I don't know why). Because of this, you won't be able to open files or enter folders whose names, for example, are written in Russian.

I replaced the Readline.readline with print+STDIN.gets.chomp Before patch: image After patch: image

alexxsstar avatar Apr 16 '24 16:04 alexxsstar

Thank you for your PR. The team will check the PR closely and will do some tests. Give us time and we'll get back to you on this.

OscarAkaElvis avatar Apr 16 '24 18:04 OscarAkaElvis

Hey @alexxsstar , after accepting your PR, I kept doing more testing... and probably we are going to reject the change finally. It seems it breaks the "remote path completion" feature.

When I did the testing it was without the "remote path completion" feature enabled. I mean, starting evil-winrm and seeing this warning:

image

As the given warning says, if you check the Readme documentation and fix that warning, the "remote path completion" feature is enabled and it seems that with that feature, utf-8 chars are working well. This is a proof, utf-8 chars can be pasted safely on the shell and even the tab completion is working on dirs with these chars:

image

So, your patch finally is not needed. You just need to enable the "remote path completion" feature and everything should be working. Probably I'll revert the changes soon.

Anyway, feel free to test it and paste here your thoughts and results.

OscarAkaElvis avatar May 06 '24 14:05 OscarAkaElvis