Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
1  
Can tou see UTF-8 in your terminal? Test to e.g. cat a file with Unicode multibyte characters. –  Daniel Andersson Apr 5 '12 at 14:52
    
Yes, but not the file I'm trying to work with. Time for a little more testing, thanks. –  Yitzchak Apr 5 '12 at 15:00
1  
Try the command file on the file in question to see encoding information. –  Daniel Andersson Apr 5 '12 at 15:03
1  
You don't need any script. Did you create the *.html files with Vim or with another editor? Did you download them from an FTP server? Do you have set termencoding=utf-8 and set encoding=utf-8 in your vimrc? –  romainl Apr 5 '12 at 21:26
1  
What exactly is the "gibberish"? To me it sounds like the file you're working with contains Unicode characters that are not supported by the font that your terminal is using. But in that case the characters are shown as squares with their Unicode value inside. –  richq Jul 21 '12 at 14:54
show 3 more comments

closed as too localized by slhck Mar 25 '13 at 14:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.