Vi and UTF-8

Vi and UTF-8

Tzafrir Cohen tzafrir at cohens.org.il
Tue Feb 16 11:08:35 IST 2010


On Mon, Feb 15, 2010 at 06:31:26PM +0200, Geoff Shang wrote:
> Hi,
>
> I don't use Vi so I don't have any idea about this.
>
> A friend is doing some translation work and needs to work in a UTF-8  
> environment.  She said she'd prefer to use Vi, but implied that she 
> thinks that it doesn't have UTF-8 support.
>
> I'dve thought that it would by now.
>
> So can anyone tell me if Vi (or possibly a clone) has UTF-8 support, and  
> if so, if she needs to do anything special to activate it?

לא

For those of you who don't read Hebrew: that was "no" in Hebrew. I just
types it into vim, which I use as my editor for writing mail messages.

When your locale is a UTF-8 one, (isn't it? If not: fix it), and vim is
built with multibyte support:

  vim --version | grep -o .multi_byte
+multi_byte

(in Debian: even vim.tiny is built with multi_byte support), it should
Just Work.


Then again, vim is but one VI, though the most popular by for, nowadays.
I haven't used nvi for quite some time. I did get to use the busybox nvi
several times lately.

Both of them seem to have reasonable (or at least: minimal) support of
editing Hebrew text: no trivial multibyte issues. I have not tried
editing or saving.

Versions I have tried:

busybox-static 1:1.14.2-2
nvi            1.81.6-8.1 

-- 
Tzafrir Cohen         | tzafrir at jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir at cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend



More information about the Linux-il mailing list