Setting locale settings

David Wolfskill david at catwhisker.org
Sat Apr 24 20:07:42 PDT 2004


>Subject: Setting locale settings
>Date: Fri, 23 Apr 2004 09:36:26 -0700
>From: "Ron Leedy" <rleedy at ketera.com>
>To: <baylisa at baylisa.org>
>Sender: owner-baylisa at baylisa.org

>How do I set the locale variables?  Such as:

>LANG=
>LC_CTYPE=en_US.ISO8859-1
>LC_NUMERIC=en_US.ISO8859-1
>LC_TIME=en_US.ISO8859-1
>LC_COLLATE=en_US.ISO8859-1
>LC_MONETARY=en_US.ISO8859-1
>LC_MESSAGES=C
>LC_ALL=

Standard answer #0:  it depends.

In this case, a great deal depends on the applications/programs that you
wish to be aware of the variables, and the computing environment that
you wish to influence by doing so.

Here are ways I might do it for some environments I might wish to
influence:

* For the local X server (usually, my laptop, running FreeBSD):

  - Set the variables (as environment variables) in ~/.xsession.

  - Same as above, but in my ~/.cshrc -- but this only works because
    my ~/.xsession is a csh script (the only one I've written, honest!)
    that "sources" ~/.cshrc.

* For applications running on some arbitrary machine somewhere in the
  world to which I login and use csh as my login shell (thus implying
  that the remote environment is sufficiently UNIX-like to support csh):

  - Set the variables (as environment variables) in ~/.login.

* Depending on the application, there may be some application-specific
  initialization file (ref. ~/.xsession, in the case of X sessions
  started via xdm & similar applications); it may be possible to specify
  such things in that file.

* If the application were (say) a Perl script of my own, I might do any
  of the above, or cobble up something within the script itself to set the
  variables (if, for whatever reason, I didn't wish to trust or use
  environment variables as they were set at the time the script started).

Note that in my present case, the computing environments I wish to
influence tend to be UNIX-ish (and in particular, FreeBSD for the most
part, with Solaris a distant second place).  Even if I recalled how to
do such things in MVS (IBM mainframe), I doubt that my memories would be
all that applicable to mainframe environments within the last 5 years or
so.

Note, too, that some environments are more amenable to manipulation than
others.  :-}

>Thanks you,

Sorry about the delay; was working on an email backlog of moderate size.
I hope the above provide some clues for you.

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
I do not "unsubscribe" from email "services" to which I have not explicitly
subscribed.  Rather, I block spammers' access to SMTP servers I control,
and encourage others who are in a position to do so to do likewise.



More information about the Baylisa mailing list