I am trying to work with a utf-8 encoded xml file in vim 7.3 running on ubuntu. ASCII characters display normally but vim gives me gibberish instead of the unicode characters. After trying the following, I've reached the limits of my knowledge:
1) Checked that unicode was enabled by running set termencoding?
. Output was termencoding=utf-8
.
2) I installed the script from here (vim.org/scripts)
3) moved my ~/.vimrc file into ~/.vim
4) moved it back into ~
5) followed the instructions in the accepted answer to this question.
Is there some other variable I'm supposed to set? I know my system has the fonts I need.
Update:
Issue seems to be limited to html files for some reason.
Update:
Solved. What I thought was unicode was in fact foreign ANSI
cat
a file with Unicode multibyte characters.file
on the file in question to see encoding information.*.html
files with Vim or with another editor? Did you download them from an FTP server? Do you haveset termencoding=utf-8
andset encoding=utf-8
in your vimrc?