CoolComputing Logo
Coupons/Deals  ·  New Promo Codes/Coupons  · November 17, 2018

Fix for Vim Weird "" Character Appearing When You Type/Paste ASCII Character

Posted on Thursday, November 4, 2010 @ 06:42:27 PM CDT by David Yee [] [read 6186 times]

 
Tips: Linux/Unix world
I was editing some files with vim on a new Linux server and was getting frustrated that everytime I try to type in or paste in the British Sterling/British pound symbol of it is prefixed with a strange character of . I did not have this problem with the pervious server I was using, which is based on FreeBSD. And when I tried to delete that character it deletes the character as well.

After almost pulling my hair out, I just figured out that it is an issue with character encoding in Vim.

If you type:

:set encoding

Vim will tell you the current encoding being used. So I typed that in Vim on the old FreeBSD server and it showed:

encoding=latin1

And when I did the same on the new Linux server in Vim, it showed:

encoding=utf-8

By default, apparently the install in Linux for Vim uses UTF-8 unicode. But I wanted encoding, which worked for me, so in my .vimrc file I entered:

:set encoding=latin1

And voila- no more oddball character weirdness.



Please rate this article or post a brief review of Fix for Vim Weird "" Character Appearing When You Type/Paste ASCII Character or comment on benchmark/performance, features, availability, price or anything else regarding Fix for Vim Weird "" Character Appearing When You Type/Paste ASCII Character. Thanks!

Fix For Vim Weird "" Character Appearing When You Type/Paste ASCII Character Rating: 2.0/5 (11 votes cast)

Your Name:
I have read and agreed to the Review Posting Agreement.
Review Title:
Comment/Review: