From owner-freebsd-hackers Wed Feb 4 23:40:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA04062 for hackers-outgoing; Wed, 4 Feb 1998 23:40:45 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from d198-232.uoregon.edu (d198-232.uoregon.edu [128.223.198.232]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA04022; Wed, 4 Feb 1998 23:40:40 -0800 (PST) (envelope-from mini@d198-232.uoregon.edu) Received: (from mini@localhost) by d198-232.uoregon.edu (8.8.5/8.8.5) id XAA13550; Wed, 4 Feb 1998 23:40:06 -0800 (PST) Message-ID: <19980204234005.30868@micron.mini.net> Date: Wed, 4 Feb 1998 23:40:05 -0800 From: Jonathan Mini To: Terry Lambert Cc: j_mini@efn.org, hackers@FreeBSD.ORG, questions@FreeBSD.ORG Subject: Re: character-set information for terminals. Reply-To: Jonathan Mini References: <19980204231234.44363@micron.mini.net> <199802050732.AAA10666@usr08.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: <199802050732.AAA10666@usr08.primenet.com>; from Terry Lambert on Thu, Feb 05, 1998 at 07:32:34AM +0000 X-files: The Truth is Out There Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" Terry Lambert stands accused of saying: > > > > Also from "man setlocale"... 8-). > > > > > > BAH! I missed the reference to a man page. Please hand me a tiny pointy > > > hat. > > > > Only problem is that the locale doesn't provide me with the information I > > need. :( > > What exactly do you need? I needed to know the font (i.e. iso 8859-l1, cp 437, etc, etc) that the user's terminal was running. Looks like the _CLOSEST_ I can get without asking the user is to grab the line drawing and a few other symbols from the termcap. *sigh* This leaves much to be desired, since a lot isn't in the termcap, such as character accents and other similar things. The locale does not give me that information. All it tells me is the formatting of various standardized things such as tiem time, date, and currency. I guess you misunderstood my original question : I need to know how to find out what font (or "character set") the user has on their terminal. Looks like there isn't really any way of auto-detecting that. > All terminal devices are expected to run in the C locale, unless > otherwise specified by the user -- just as all terminal devices > are expected to behave as dumb tty's, unless otherwise specified > by the user. > > In either case, the user does their specifying with environment > variables. > > One might wish for an explicit locale specification mechanism in > /etc/ttys, just as terminal types may be specified there. > > NOTE: Your use of the TERM environment variable to "know" the > terminal type of the device and therefore which termcap entry to > use is limited to the fact that there is an explicit mapping of > device to line; the rest of your environment comes in via an > environment passing mechanism, for pty devices accessed by other > programs. > > Unfortunately, there is no explicit locale mechanism in /etc/ttys; > and even though there is *exactly* the same static mapping of the > /etc/gettytab entries as there is TERM envirnment variable values, > there is also no explicit locale mechanism in /etc/gettytab. > > Of course, there's a non-explicit locale mechanism in /etc/gettytab: > set the environment variables using the "ev" property... > > Then you might want to set a vt220 initialization string the the vt220 > termcap to place it in an NRCS mode (or download sixels for your > chosen international character set), by overloading "im"... > > But then if you did all that, you might as well set the terminal type > using the "tt" property, instead of putting it in /etc/ttys. > > And if all else fails, run a program other than /usr/bin/login to > get everything set up (using the "lo" property... > > man ttys > man gettytab > > 8-). > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. -- Jonathan Mini (j_mini@efn.org) "A child of five could understand this! Quick -- Fetch me a child of five."