From owner-freebsd-stable Fri Mar 27 03:20:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA09159 for freebsd-stable-outgoing; Fri, 27 Mar 1998 03:20:55 -0800 (PST) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA09146 for ; Fri, 27 Mar 1998 03:20:40 -0800 (PST) (envelope-from dag-erli@ifi.uio.no) Received: from hrotti.ifi.uio.no (2602@hrotti.ifi.uio.no [129.240.64.15]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with ESMTP id MAA00500; Fri, 27 Mar 1998 12:20:28 +0100 (MET) Received: (from dag-erli@localhost) by hrotti.ifi.uio.no ; Fri, 27 Mar 1998 12:20:27 +0100 (MET) Mime-Version: 1.0 To: Kyle Mestery Cc: freebsd-stable@FreeBSD.ORG Subject: Setting the correct locale (was: Fxtv no longer works for me.) References: Organization: Gutteklubben Terrasse / KRST / PUMS / YASMW X-url: http://www.stud.ifi.uio.no/~dag-erli/ X-Stop-Spam: http://www.cauce.org From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) Date: 27 Mar 1998 12:20:26 +0100 In-Reply-To: Kyle Mestery's message of "Tue, 24 Mar 1998 18:06:51 -0600 (CST)" Message-ID: Lines: 42 X-Mailer: Gnus v5.5/Emacs 19.34 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id DAA09152 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk >From -multimedia: Kyle Mestery writes: > hope.winternet.com$ fxtv > Warning: locale not supported by C library, locale unchanged > open("/dev/bktr0") failed: Device not configured This (i.e. that second line in the quote above) is a common problem for non-American FreeBSD boxes, because /etc/profile just doesn't do the Right Thing (tm). The comments in /etc/profile suggest the following: # Uncomment next two lines to activate Italian locale # LANG=it_IT.ISO_8859-1; export LANG # MM_CHARSET=ISO-8859-1; export MM_CHARSET But this is not enough; it doesn't set the locale correctly for most X software (e.g. Emacs) or even Perl 5. In fact, I'm not even sure it makes *any* sense at all; I don't know of any software that actually uses $LANG and/or $MM_CHARSET¹. IMHO the Right Thing (tm) to do (according to e.g. 'man setlocale') is the following: LC_ALL=it_IT.ISO_8859-1; export LC_ALL This will stop Emacs, Perl 5 and a bunch of other apps from complaining about an unsupported locale. All my FreeBSD boxes have a similar line, and no LANG or MM_CHARSET, in their /etc/profile². ¹ but a quick 'grep -l MM_CHARSET /usr/local/bin' gives mailto, mailto-hebrew, metamail, rtin, shownonascii and tin. Not one of my boxes though; I don't use any of this stuff except MetaMail. init(8) also contains the string MM_CHARSET but I suspect that's because it's statically linked. ² Actually, I use en_US instead of no_NO because I don't want the system to speak Norwegian to me and I can't be buggered to use separate locale settings; what I *should* do is set LC_TIME to en_US and everything else - or at least LC_COLLATE and LC_CTYPE - to no_NO -- fprintf(stderr, "I have a closed mind. It helps keeping the rain out.\n"); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message