Home » Questions » Computers [ Ask a new question ]

Vim: How to handle Unicode files with text in multiple (more than two) languages?

Vim: How to handle Unicode files with text in multiple (more than two) languages?

What settings do I need to set in Vim/gVim to be able to view Unicode text files which have text in many languages?

Asked by: Guest | Views: 371
Total answers/comments: 2
Guest [Entry]

"Using gVim on Windows, I did the following two things:

:set encoding=utf-8
:set guifont=*

The second command brings up a font picker. By choosing the font ""@MS Mincho"", I got some of the Japanese characters to display, but oddly they were rotated 90 degrees to the left.

Anyway, you'll have to set the encoding before loading or pasting text into gVim (otherwise it might just convert them to all question marks). Then you'll have to find a font that is (a) fixed width, and (b) includes the characters you want to see. I don't seem to have such a font on my system at the moment, but you may."
Guest [Entry]

"The font Arial Unicode MS supports japanese, chinese and korean as well as vietnamese and arabic. You could try using that font, though I don't believe it is monospaced.

http://www.microsoft.com/typography/fonts/font.aspx?FMID=1081

There may be other pan-language fonts out there, perhaps monospaced ones as well, but I don't know of them.

edit

I found this page with a few fonts that support all three languages. Some of them are available as free downloads:
http://www.wazu.jp/gallery/Fonts_Japanese.html"