Skip site navigation (1)Skip section navigation (2)
Date:      27 Mar 1998 12:20:26 +0100
From:      dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= )
To:        Kyle Mestery <mestery@winternet.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Setting the correct locale (was: Fxtv no longer works for me.)
Message-ID:  <xzpyaxwgz2d.fsf@hrotti.ifi.uio.no>
In-Reply-To: Kyle Mestery's message of "Tue, 24 Mar 1998 18:06:51 -0600 (CST)"
References:  <Pine.GSO.3.96.980324180434.8617A-100000@tundra.winternet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>From -multimedia:

Kyle Mestery <mestery@winternet.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpyaxwgz2d.fsf>