Blasted 8 digit error codes!

Peter Jeffe 512.823.4091 jeffe at sandino.austin.ibm.com
Sat Oct 6 10:29:28 AEST 1990


In article <14415 at paperboy.OSF.ORG> mbrown at tonic.osf.org (Mark Brown) writes:
>#cd /usr/lpp/msg/$FOO      (in the US, $FOO == En_US . In other locales,
>			    it will be something similar.)
>#mv *.cat $BAR             ($BAR == some storage facility)
>
>All commands (excepting shells and other programs currently running) will
>now default to the XPG "C" locale, which is built into the code.

The only problem with this is that there are many programs that don't
have default messages built into the code (yuk!).  These rely on the
catalogs being found in one of the directories in the NLSPATH, so if
you just blow away the catalogs in the $LANG directory you'll probably
disable these programs.

The saving grace (I think) is that when the LANG is set to C or nothing,
the NLSPATH is effectively set to /usr/lpp/msg/C alone; so any programs
that don't have built-in messages must have a link in the C directory
to their real catalog, otherwise they won't work with the default C
"language."

So: I believe that it is safe to blow away all catalogs in the $LANG
directory as long as they don't have a link in the C directory.  I.e.,
doing

    cd /usr/lpp/msg/$LANG  # assuming $LANG is En_US or the like
    for f in * ; do [ -f ../C/$f ] || mv $f $SAVEDIR ; done

should leave you with just the catalogs you need.  (You may also want
to blow away their corresponding symlinks in the prime directory to
free up that space.)

This way you can leave your LANG variable where it makes sense for your
locale (since this affects time/date/money format, collating sequence,
etc.), while not subjecting yourself to undue verbosity--a cherished
right of all Unix fans, eh?

-------------------------------------------------------------------------------
  disclaimer: given the subjective nature of reality, the opinions contained
  herein can have no relationship to any other person's conception of reality,
  and cannot therefore constitute grounds for a lawsuit, right?

Peter Jeffe   ...uunet!cs.utexas.edu!ibmchs!auschs!sandino.austin.ibm.com!jeffe



More information about the Comp.unix.aix mailing list