From owner-freebsd-hackers Fri Jul 25 12:33:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA20004 for hackers-outgoing; Fri, 25 Jul 1997 12:33:12 -0700 (PDT) Received: from pegas.carrier.kiev.ua (root@pegas.carrier.kiev.ua [193.193.193.100]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA19996 for ; Fri, 25 Jul 1997 12:32:59 -0700 (PDT) Received: from sivka.carrier.kiev.ua (root@sivka.carrier.kiev.ua [193.193.193.101]) by pegas.carrier.kiev.ua (8.8.5/8.Who.Cares/Open) with ESMTP id WAA05571; Fri, 25 Jul 1997 22:43:55 +0300 (EEST) Received: (from uucp@localhost) by sivka.carrier.kiev.ua (8.8.6/8.8.6) with UUCP id WAA01437; Fri, 25 Jul 1997 22:31:48 +0300 (EEST) Received: from localhost (archer@localhost [127.0.0.1]) by grape.carrier.kiev.ua (8.8.6/8.8.6) with SMTP id VAA09448; Fri, 25 Jul 1997 21:42:06 +0300 (EEST) Date: Fri, 25 Jul 1997 21:42:03 +0300 (EEST) From: Alexander Litvin Reply-To: Alexander Litvin To: Andrzej Bialecki cc: freebsd-hackers@freebsd.org Subject: Re: Nvi and locale In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 25 Jul 1997, Andrzej Bialecki wrote: > Hi! > > I can't get vi to properly display my national characters. As I read in > nvi docs, I should set my locale, so I did: > > setenv LANG C > setenv LC_CTYPE lt_LN.ISO-8859-1 <- from nvi docs (why ???) > > and it still prints all the special characters as \xf3 \xb6 and so on. > > What am I doing wrong? What I found is that setlocale in 2.2.x is not setting "partial" locale information when called as setlocale(LC_ALL,"") -- as it is called at the beginning of the most progs. E.g., I have "export LANG=ru_SU.KOI8-R", but I don't like to have dates displayed in Russian, so I setted also LC_TIME=ascii. But in such a case after setlocale(LC_ALL,"") I have all LC_xxxx set to C :-(, and nvi treats all that russian chars as non-printable. In 2.1.x that seems to work differently. > > > Sincerely yours, > > --- > Andrzej Bialecki FreeBSD: Turning PCs Into Workstations > http://www.freebsd.org > Research and Academic Network in Poland > -- Litvin Alexander No SIGNATURE available at this run-level