Closed FR4N7Z closed 6 years ago
Thanks for the report. I think the issue is that the environment calls the encoding "latin1", but Ruby only knows that encoding by the name "ISO-8859-1". Does this patch fix it for you?
diff --git a/autoload/lustyexplorer.vim b/autoload/lustyexplorer.vim
index e97b17d..1a88d7b 100644
--- a/autoload/lustyexplorer.vim
+++ b/autoload/lustyexplorer.vim
@@ -893,7 +893,9 @@ class FilesystemExplorer < Explorer
path = VIM::getcwd()
end
if path.respond_to?(:force_encoding)
- path = path.force_encoding(VIM::evaluate('&enc'))
+ encoding = VIM::evaluate('&enc')
+ encoding = 'ISO-8859-1' if encoding == 'latin1'
+ path = path.force_encoding(encoding)
end
@prompt.set!(path + File::SEPARATOR)
run()
Hello, thank you for the patch but it's still doesn't work. Thanks for your help.
Can you tell me more? What error does it give you after the patch?
unknown encoding name - latin1
eval:803:in force_encoding' eval:803:in
run_from_path'
eval:1:in block in <main>' eval:253:in
profile'
eval:1:in `
It doesn't look like the patch has been applied. Can you check again?
I put all the text of your patch in a textfile.patch and applyed patch -i textfile.patch lusty-explorer.vim
When I open the file now, lines 1130 to 1138 look like : path = VIM::getcwd() end if path.respond_to?(:force_encoding) encoding = VIM::evaluate('&enc') encoding = 'ISO-8859-1' if encoding == 'latin1' path = path.force_encoding(encoding) end @prompt.set!(path + File::SEPARATOR) run()
Okay. The patch should be applied to autoload/lustyexplorer.vim
, not lusty-explorer.vim
. Also: those line numbers are suspicious, as lusty-explorer.vim
is only 284 lines long.
I'm pretty sure this patch fixes the problem, so I'll just commit it and you can let me know if it works for you at HEAD.
OK I understand but I'm using vundle so I don't have an autoload folder. Should I use Pathogen for this plugin? I tried to update the plugin but it still doesn't work. Thank you
I don't use Vundle or Pathogen, so I can't help you there. The README shows the installation instructions that I follow.
This is/was a legitimate issue, so thanks for taking the time to report it, and I'm pretty sure it's fixed now. Good luck straightening out your configuration. (No snark intended.)
Now it works with the patch. Thanks a lot.
Hello, When I start lustyexplorer from vim n windows, I got the following error :
unknown encoding name - latin1 eval:803:in'
force_encoding' eval:803:in
run_from_path' eval:1:inblock in <main>' eval:253:in
profile' eval:1:in `I am running Windows 10, gvim80-586, ruby 2.2.6
Thank you.