wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.74k stars 317 forks source link

incompatible encoding #319

Closed tgzhou98 closed 5 years ago

tgzhou98 commented 6 years ago

When I use the Command-t Jump I get the error

/Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:408:in `scan' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:408:in `match_with_syntax_highlight' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:386:in `match_text_for_idx' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:445:in `block in print_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:444:in `each' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:444:in `print_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:225:in `matches=' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:314:in `list_matches' (eval):3:in `list_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:359:in `list_matches!' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:265:in `clear' (eval):3:in `clear' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:379:in `show' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:95:in `show_jump_finder' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:408:in `scan' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:408:in `match_with_syntax_highlight' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:386:in `match_text_for_idx' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:445:in `block in print_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:444:in `each' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:444:in `print_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:225:in `matches=' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:314:in `list_matches' (eval):3:in `list_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:359:in `list_matches!' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:265:in `clear' (eval):3:in `clear' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:379:in `show' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:95:in `show_jump_finder' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:408:in `scan' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:408:in `match_with_syntax_highlight' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:386:in `match_text_for_idx' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:445:in `block in print_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:444:in `each' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:444:in `print_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:225:in `matches=' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:314:in `list_matches' (eval):3:in `list_matches' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:359:in `list_matches!' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:265:in `clear' (eval):3:in `clear' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:379:in `show' /Users/zhoutiangang/.vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:95:in `show_jump_finder' Error detected while processing function commandt#JumpFinder: line 2: Encoding::CompatibilityError: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)

I'm use ruby2.4.2 and i have set encoding in utf-8 set fileencodings=utf-8,gb2312,gbk,gb18030 set termencoding=utf-8 set encoding=utf-8

The command-t file search doesn't work at some times but it seems that when i open Command-t Jumps cause the problem? but the error information is the same.

my vim version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 16 2017 11:23:51) macOS version Included patches: 1-1250 Compiled by Homebrew Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_old_static +arabic +find_in_path -mouse_sysmouse -tag_any_white +autocmd +float +mouse_urxvt -tcl -balloon_eval +folding +mouse_xterm +termguicolors -browse -footer +multi_byte +terminal ++builtin_terms +fork() +multi_lang +terminfo +byte_offset -gettext -mzscheme +termresponse +channel -hangul_input +netbeans_intg +textobjects +cindent +iconv +num64 +timers +clientserver +insert_expand +packages +title +clipboard +job +path_extra -toolbar +cmdline_compl +jumplist +perl +user_commands +cmdline_hist +keymap +persistent_undo +vertsplit +cmdline_info +lambda +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con -lua +rightleft +windows +diff +menu +ruby +writebackup +digraphs +mksession +scrollbind +X11 -dnd +modify_fname +signs +xfontset -ebcdic +mouse +smartindent -xim +emacs_tags -mouseshape +startuptime -xpm +eval +mouse_dec +statusline +xsmp_interact +ex_extra -mouse_gpm -sun_workshop +xterm_clipboard +extra_search -mouse_jsbterm +syntax -xterm_save +farsi +mouse_netterm +tag_binary system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lXt -lX11 -lSM -lICE -lncurses -liconv -framework AppKit -mmacosx-version-min=10.11 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/opt/python/Frameworks -framework Python -lruby.2.4.2 -lobjc By the way,I do have some Chinese in my filename But the command-t shows the char correctly In some cases

Anyone has an idea?

mgedmin commented 5 years ago

Duplicate of #188?

wincent commented 5 years ago

Duplicate of #188?

Yeah, probably is. Will close this one.