Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man5/environ.5
          +++ new/usr/src/man/man5/environ.5
   1    1  '\" te
   2    2  .\" Copyright 1989 AT&T
   3    3  .\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
        4 +.\" Copyright (c) 2014, Joyent, Inc.  All Rights Reserved
        5 +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   4    6  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5    7  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6    8  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7      -.TH ENVIRON 5 "Nov 19, 2002"
        9 +.TH ENVIRON 5 "Jun 26, 2014"
   8   10  .SH NAME
   9   11  environ \- user environment
  10   12  .SH DESCRIPTION
  11      -.sp
  12   13  .LP
  13   14  When a process begins execution, one of the \fBexec\fR family of functions
  14   15  makes available an array of strings called the environment; see \fBexec\fR(2).
  15   16  By convention, these strings have the form \fIvariable=value\fR, for example,
  16   17  \fBPATH=/sbin:/usr/sbin\fR. These environmental variables provide a way to make
  17   18  information about a program's environment available to programs.
  18      -.sp
  19   19  .LP
  20   20  A name may be placed in the environment by the \fBexport\fR command and
  21   21  \fIname\fR=\fIvalue\fR arguments in \fBsh\fR(1), or by one of the \fBexec\fR
  22   22  functions. It is unwise to conflict with certain shell variables such as
  23   23  \fBMAIL\fR, \fBPS1\fR, \fBPS2\fR, and \fBIFS\fR that are frequently exported by
  24   24  \fB\&.profile\fR files; see \fBprofile\fR(4).
  25      -.sp
  26   25  .LP
  27   26  The following environmental variables can be used by applications and are
  28   27  expected to be set in the target run-time environment.
  29   28  .sp
  30   29  .ne 2
  31   30  .na
  32   31  \fB\fBHOME\fR\fR
  33   32  .ad
  34   33  .sp .6
  35   34  .RS 4n
↓ open down ↓ 2 lines elided ↑ open up ↑
  38   37  .RE
  39   38  
  40   39  .sp
  41   40  .ne 2
  42   41  .na
  43   42  \fB\fBLANG\fR\fR
  44   43  .ad
  45   44  .sp .6
  46   45  .RS 4n
  47   46  The string used to specify internationalization information that allows users
  48      -to work with different national conventions. The \fBsetlocale\fR(3C) function
  49      -checks the \fBLANG\fR environment variable when it is called with \fB""\fR as
       47 +to work with different national conventions. The \fBsetlocale\fR(3C) and
       48 +\fBnewlocale\fR(3C) functions
       49 +check the \fBLANG\fR environment variable when they are called with \fB""\fR as
  50   50  the \fBlocale\fR argument.  \fBLANG\fR is used as the default locale if the
  51   51  corresponding environment variable for a particular category is unset or null.
  52   52  If, however,  \fBLC_ALL\fR is set to a valid, non-empty value, its contents are
  53   53  used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. For
  54   54  example, when invoked as \fBsetlocale(LC_CTYPE, "")\fR, \fBsetlocale()\fR will
  55   55  query the \fBLC_CTYPE\fR environment variable first to see if it is set and
  56   56  non-null. If \fBLC_CTYPE\fR is not set or null, then \fBsetlocale()\fR will
  57   57  check the \fBLANG\fR environment variable to see if it is set and non-null. If
  58   58  both \fBLANG\fR and \fBLC_CTYPE\fR are unset or \fINULL\fR, the default "C"
  59   59  locale will be used to set the \fBLC_CTYPE\fR category.
  60   60  .sp
  61   61  Most commands will invoke \fBsetlocale(LC_ALL, "")\fR prior to any other
  62   62  processing. This allows the command to be used with different national
  63      -conventions by setting the appropriate environment variables.
       63 +conventions by setting the appropriate environment variables. In addition, some
       64 +commands will use
       65 +.BR uselocale (3C)
       66 +to set a thread-specific locale.
  64   67  .sp
  65   68  The following environment variables correspond to each category of
  66   69  \fBsetlocale\fR(3C):
  67   70  .sp
  68   71  .ne 2
  69   72  .na
  70   73  \fB\fBLC_ALL\fR\fR
  71   74  .ad
  72   75  .sp .6
  73   76  .RS 4n
↓ open down ↓ 3 lines elided ↑ open up ↑
  77   80  
  78   81  .sp
  79   82  .ne 2
  80   83  .na
  81   84  \fB\fBLC_COLLATE\fR\fR
  82   85  .ad
  83   86  .sp .6
  84   87  .RS 4n
  85   88  This category specifies the character collation sequence being used.  The
  86   89  information corresponding to this category is stored in a database  created by
  87      -the \fBlocaledef\fR(1) command.   This environment variable affects
       90 +the \fBlocaledef\fR(1) command.  This environment variable affects
  88   91  \fBstrcoll\fR(3C) and \fBstrxfrm\fR(3C).
  89   92  .RE
  90   93  
  91   94  .sp
  92   95  .ne 2
  93   96  .na
  94   97  \fB\fBLC_CTYPE\fR\fR
  95   98  .ad
  96   99  .sp .6
  97  100  .RS 4n
↓ open down ↓ 412 lines elided ↑ open up ↑
 510  513  these optional fields are not specified.
 511  514  .sp
 512  515  The \fItime\fR has the same format as \fIoffset\fR except that no leading sign
 513  516  ("-" or "+" ) is allowed. If \fItime\fR is not specified, the default value is
 514  517  02:00:00.
 515  518  .RE
 516  519  
 517  520  .RE
 518  521  
 519  522  .SH SEE ALSO
 520      -.sp
 521  523  .LP
 522  524  \fBcat\fR(1), \fBdate\fR(1), \fBed\fR(1), \fBfmtmsg\fR(1), \fBlocaledef\fR(1),
 523  525  \fBlogin\fR(1), \fBls\fR(1), \fBmkmsgs\fR(1), \fBnice\fR(1), \fBnohup\fR(1),
 524  526  \fBsh\fR(1), \fBsort\fR(1), \fBtime\fR(1), \fBvi\fR(1), \fBexec\fR(2),
 525  527  \fBaddseverity\fR(3C), \fBcatopen\fR(3C), \fBctime\fR(3C), \fBctype\fR(3C),
 526  528  \fBfmtmsg\fR(3C), \fBgetdate\fR(3C), \fBgetnetpath\fR(3NSL), \fBgettext\fR(3C),
 527  529  \fBgettxt\fR(3C), \fBlocaleconv\fR(3C), \fBmblen\fR(3C), \fBmktime\fR(3C),
      530 +\fBnewlocale\fR(3C),
 528  531  \fBprintf\fR(3C), \fBsetlocale\fR(3C), \fBstrcoll\fR(3C), \fBstrftime\fR(3C),
 529      -\fBstrtod\fR(3C), \fBstrxfrm\fR(3C), \fBTIMEZONE\fR(4), \fBnetconfig\fR(4),
 530      -\fBpasswd\fR(4), \fBprofile\fR(4)
      532 +\fBstrtod\fR(3C), \fBstrxfrm\fR(3C), \fBuselocale\fR(3C), \fBTIMEZONE\fR(4),
      533 +\fBnetconfig\fR(4), \fBpasswd\fR(4), \fBprofile\fR(4)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX