Notice that there is a difference between set encoding and set fileencoding In the first case, you'll change the output encoding that is shown in the terminal.
Cristian Ciupitu Johan Johan 2, 1 1 gold badge 18 18 silver badges 15 15 bronze badges. Apache was outputting utf-8, so was php, so the browser said, so vim said with set encoding , and still the pages showed mangled characters that were alright as iso Just: iconv -f utf -t utf-8 file. Downside, iconv might not be easily available on Windows. AdrianoVaroliPiazza neither vim. I'd say multiple "just install" downloads, with even a portable edition" constitutes "easily available".
Show 1 more comment. Francis Francis Thanks for your answer, it led me to learn more about the UTF byte order mark. See here for an explanation and reference. It's not a problem and even helpful for vim, I just thought people should just be aware that it may cause compatibility issues elsewhere.
Is it bomb or bom , and can it be unset? EDIT : Yes, you can remove it via set nobomb. Yes, VIm set up us the bomb with a b. Hans Ginzel Hans Ginzel 6, 3 3 gold badges 21 21 silver badges 22 22 bronze badges. HopeHole HopeHole 1 2 2 bronze badges. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. A UTF-8 file without a byte-order mark will be hard to edit because any multibyte characters will be shown in the buffer as character sequences instead of single characters.
Worse, Vim, by default, uses Latin-1 to represent the text in the buffer. So a UTF-8 file with a byte-order mark will be corrupted by down-conversion to Latin The solution is to configure Vim to use UTF-8 internally.
This is, in fact, recommended in the Vim documentation, and the only reason it is not configured that way out of the box is to avoid creating enormous confusion among users who expect Vim to operate basically as a Latin-1 editor. This will affect not just Vim but any software which relies on LANG to determine how it should represent text. Now Vim will use UTF-8 to represent the text in the buffer.
Thanks for this. When I did :e! I'm guessing the default behavior is to fall back silently to some other encoding when this happens on Vim opening. Show 1 more comment. Doing like this: Load fontforge, select latha. Good luck! Community Bot 1 1 1 silver badge. Yi Zhao Yi Zhao 6, 1 1 gold badge 17 17 silver badges 18 18 bronze badges. I could not change latha font to monospace.
I followed your steps exactly but the saved file still doesn't work as monospaced font : — Sathish Manohar. Install the new TTF file. This new font should be available in your list. After all those years 7 years later, there are several free fonts available for VIM. Google Noto fonts google. Is this problem solved meanwhile? Tobias Tobias 2, 3 3 gold badges 23 23 silver badges 38 38 bronze badges. What is a sensible value for guifont? What did you put in?
I listed the values which worked for me in this answer. Ryan Shillington Ryan Shillington 18k 11 11 gold badges 82 82 silver badges 94 94 bronze badges. On Windows gvim just select "Lucida Console" font. Alex Dvoretskiy Alex Dvoretskiy 1 1 silver badge 7 7 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
0コメント