You are not logged in.

#1 2011-09-23 18:20:12

Archdove
Member
Registered: 2011-09-23
Posts: 118

VIM Plugin VJDE, Ruby Error: invalid byte sequence in UTF-8

Hello

I'm trying to install the vim VJDE Plugin for java syntax highlighting.

wget tarball
tar xvzf tarball
makepkg -s
pacman -U ...

No Problems here.

When i run vim foo.java it shows me this mesage:

Error detected while processing /usr/share/vim/vim73/plugin/vjde/vjde_template.vim:
line   18:
ArgumentError: invalid byte sequence in UTF-8

Code on line 18:
ruby Vjde::VjdeTemplateManager.load_all(VIM::evaluate('g:vjde_install_path'))

So.. I'm no ruby programmer but i dont see any non UTF-8 Character in it.
When i comment it out, the error does not show.

Couldn't google anything about it. Maybe it's just a bug in the current version of Ruby.

Would be nice if anyone can help me.

Regards, Archdove

Last edited by Archdove (2011-09-23 18:21:35)

Offline

#2 2011-12-05 21:17:41

dracorp
Member
From: Poland, Gdańsk
Registered: 2010-05-11
Posts: 10
Website

Re: VIM Plugin VJDE, Ruby Error: invalid byte sequence in UTF-8

Hi,
It's a encoding problem. I wrote about this problem to author. He uses en utf8 locale, but some files has unrecognized encoding. Enconv can't convert to utf8.

$ find  -type f -a ! -name readtags -a ! -name '*.class' -a ! -name '*.jar' | xargs enconv
enconv: Cannot convert `./src/previewwindow.cpp' from unknown encoding
enconv: Cannot convert `./src/wspawn.cpp' from unknown encoding
enconv: Cannot convert `./src/tipswnd.lex' from unknown encoding
enconv: Cannot convert `./src/vjde/completion/ClassInfo.java' from unknown encoding
enconv: Cannot convert `./src/vjde/completion/Completion.java' from unknown encoding
enconv: Cannot convert `./src/tipswnd.c' from unknown encoding
enconv: Cannot convert `./plugin/vjde/vjde_java_completion.vim' from unknown encoding
enconv: Cannot convert `./plugin/vjde/project.vim' from unknown encoding
enconv: Cannot convert `./plugin/vjde/vjde_tag_loader.vim' from unknown encoding
enconv: Cannot convert `./plugin/vjde/tlds/java.vjde' from unknown encoding

I'm looking how to convert to utf8. Try open file e.g. src/previewwindow.cpp in vim with fencs=gbk,utf8,default. Vim detect fenc cp936. In line 644 are chinese characters(?): /* 另一个回调函数 */
Any idea?


My AUR packages

Offline

#3 2011-12-06 16:56:08

dracorp
Member
From: Poland, Gdańsk
Registered: 2010-05-11
Posts: 10
Website

Re: VIM Plugin VJDE, Ruby Error: invalid byte sequence in UTF-8

Try this.


My AUR packages

Offline

Board footer

Powered by FluxBB