Error when Chinese characters encountered in paths
It seems that there is a bug when any Chinese characters contained in paths to search, the error message shows follow details:
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:31:in `join'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:31:in `block in add_paths_for_directory'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:29:in `foreach'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:29:in `add_paths_for_directory'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:13:in `paths!'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:40:in `block in paths'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:88:in `set_wild_ignore'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:40:in `paths'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/finder.rb:29:in `sorted_matches_for'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/finder.rb:29:in `sorted_matches_for'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:261:in `list_matches'
(eval):3:in `list_matches'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:295:in `list_matches!'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:220:in `clear'
(eval):3:in `clear'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:312:in `show'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:114:in `show_file_finder'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:31:in `join'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:31:in `block in add_paths_for_directory'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:29:in `foreach'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:29:in `add_paths_for_directory'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:13:in `paths!'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:40:in `block in paths'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:88:in `set_wild_ignore'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:40:in `paths'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/finder.rb:29:in `sorted_matches_for'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/finder.rb:29:in `sorted_matches_for'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:261:in `list_matches'
(eval):3:in `list_matches'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:295:in `list_matches!'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:220:in `clear'
(eval):3:in `clear'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:312:in `show'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:114:in `show_file_finder'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:31:in `join'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:31:in `block in add_paths_for_directory'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:29:in `foreach'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:29:in `add_paths_for_directory'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb:13:in `paths!'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:40:in `block in paths'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:88:in `set_wild_ignore'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/scanner/file_scanner.rb:40:in `paths'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/finder.rb:29:in `sorted_matches_for'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/finder.rb:29:in `sorted_matches_for'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:261:in `list_matches'
(eval):3:in `list_matches'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:295:in `list_matches!'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:220:in `clear'
(eval):3:in `clear'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:312:in `show'
/Users/xiewneqi/.vim/bundle/command-t/ruby/command-t/controller.rb:114:in `show_file_finder'
Error detected while processing function commandt#CommandTShowFileFinder:
line 2:
Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
I have declared commandT using utf-8 encoding in .vimrc: let g:CommandTEncoding='utf-8'
Thanks for the report. Can you give me a sample path? Perhaps as a file in a zip archive so that I can try to reproduce this locally?
vim资料.zip hi wincent, here is a zip archive containing several text files whose names contains Chinese characters, you can try with this.
Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on[^patches]. Feedback issue for 6.0.x is here:
- https://github.com/wincent/command-t/issues/393
[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.