Date: Wed, 29 May 1996 11:19:10 +0000 (GMT) From: Gabor Zahemszky <zgabor@CoDe.hu> To: freebsd-questions@freebsd.org Subject: vi + char > 128 Message-ID: <199605291119.LAA01394@CoDe.CoDe.hu>
next in thread | raw e-mail | index | archive | help
Hi! Somebody asked, how can we use chars with code > 128 under vi. Now, I downloaded the nvi-1.66.ALPHA, and in it there is a line, we have to set the LC_CTYPE environment variable to some locale. (In the nvi doc, there is a line about the LANG variable, but it doesn't need.) So the only thing: sh/ksh/bash: LC_CTYPE=lt_LN.ISO_8859-1 export LC_CTYPE csh/tcsh: setenv LC_CTYPE lt_LN.ISO_8859-1 (or use some user-defined locale from /usr/share/locale) That's it. It has only one problem: in the definition of the locales, the characters between 128 and 160 are defined as non-printable, so these characters displayed as 0xuv or \xyz (as the octal flag says) Opps! I tried the russian locales, and it's good, so instead of lt_..., use: ru_SU.CP866 or ru_SU.KOI8-R, and you can see everything on the screen. Of course, it works with the vi (nvi-1.34) in the 2.1.0R installation, too. so the best method is to use an alias: alias vi='env LC_CTYPE=ru_SU.CP866 vi' (or alias vi 'env LC_CTYPE=ru_SU.CP866 vi' in csh) -- Gabor Zahemszky <zgabor@CoDe.hu> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- Earth is the cradle of human sense, but you can't stay in the cradle forever. Tsiolkovsky
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605291119.LAA01394>
