From owner-freebsd-questions Wed May 29 02:39:37 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA22192 for questions-outgoing; Wed, 29 May 1996 02:39:37 -0700 (PDT) Received: from mail.EUnet.hu (mail.eunet.hu [193.225.28.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA22180 for ; Wed, 29 May 1996 02:39:24 -0700 (PDT) Received: by mail.EUnet.hu, id LAA09574; Wed, 29 May 1996 11:39:10 +0200 Received: by CoDe.CoDe.hu (LAA01394); Wed, 29 May 1996 11:19:10 GMT From: Gabor Zahemszky Message-Id: <199605291119.LAA01394@CoDe.CoDe.hu> Subject: vi + char > 128 To: freebsd-questions@freebsd.org Date: Wed, 29 May 1996 11:19:10 +0000 (GMT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- Earth is the cradle of human sense, but you can't stay in the cradle forever. Tsiolkovsky