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
   1 '\" te
   2 .\" Copyright 1989 AT&T
   3 .\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved


   4 .\" 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 .\" 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 .\" 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"
   8 .SH NAME
   9 environ \- user environment
  10 .SH DESCRIPTION
  11 .sp
  12 .LP
  13 When a process begins execution, one of the \fBexec\fR family of functions
  14 makes available an array of strings called the environment; see \fBexec\fR(2).
  15 By convention, these strings have the form \fIvariable=value\fR, for example,
  16 \fBPATH=/sbin:/usr/sbin\fR. These environmental variables provide a way to make
  17 information about a program's environment available to programs.
  18 .sp
  19 .LP
  20 A name may be placed in the environment by the \fBexport\fR command and
  21 \fIname\fR=\fIvalue\fR arguments in \fBsh\fR(1), or by one of the \fBexec\fR
  22 functions. It is unwise to conflict with certain shell variables such as
  23 \fBMAIL\fR, \fBPS1\fR, \fBPS2\fR, and \fBIFS\fR that are frequently exported by
  24 \fB\&.profile\fR files; see \fBprofile\fR(4).
  25 .sp
  26 .LP
  27 The following environmental variables can be used by applications and are
  28 expected to be set in the target run-time environment.
  29 .sp
  30 .ne 2
  31 .na
  32 \fB\fBHOME\fR\fR
  33 .ad
  34 .sp .6
  35 .RS 4n
  36 The name of the user's login directory, set by \fBlogin\fR(1) from the password
  37 file; see \fBpasswd\fR(4).
  38 .RE
  39 
  40 .sp
  41 .ne 2
  42 .na
  43 \fB\fBLANG\fR\fR
  44 .ad
  45 .sp .6
  46 .RS 4n
  47 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

  50 the \fBlocale\fR argument.  \fBLANG\fR is used as the default locale if the
  51 corresponding environment variable for a particular category is unset or null.
  52 If, however,  \fBLC_ALL\fR is set to a valid, non-empty value, its contents are
  53 used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. For
  54 example, when invoked as \fBsetlocale(LC_CTYPE, "")\fR, \fBsetlocale()\fR will
  55 query the \fBLC_CTYPE\fR environment variable first to see if it is set and
  56 non-null. If \fBLC_CTYPE\fR is not set or null, then \fBsetlocale()\fR will
  57 check the \fBLANG\fR environment variable to see if it is set and non-null. If
  58 both \fBLANG\fR and \fBLC_CTYPE\fR are unset or \fINULL\fR, the default "C"
  59 locale will be used to set the \fBLC_CTYPE\fR category.
  60 .sp
  61 Most commands will invoke \fBsetlocale(LC_ALL, "")\fR prior to any other
  62 processing. This allows the command to be used with different national
  63 conventions by setting the appropriate environment variables.



  64 .sp
  65 The following environment variables correspond to each category of
  66 \fBsetlocale\fR(3C):
  67 .sp
  68 .ne 2
  69 .na
  70 \fB\fBLC_ALL\fR\fR
  71 .ad
  72 .sp .6
  73 .RS 4n
  74 If set to a valid, non-empty string value, override the values of \fBLANG\fR
  75 and all the other \fBLC_*\fRvariables.
  76 .RE
  77 
  78 .sp
  79 .ne 2
  80 .na
  81 \fB\fBLC_COLLATE\fR\fR
  82 .ad
  83 .sp .6


 500 .sp .6
 501 .RS 4n
 502 The \fId\fR^th day, (0 \(<= \fId\fR \(<= 6) of week \fIn\fR of month \fIm\fR of
 503 the year (1 \(<= \fIn\fR \(<= 5, 1 \(<= \fIm\fR \(<= 12), where week 5 means
 504 "the last \fId\fR-day in month \fIm\fR" which may occur in either the fourth or
 505 the fifth week). Week 1 is the first week in which the \fId\fR^th day occurs.
 506 Day zero is Sunday.
 507 .RE
 508 
 509 Implementation specific defaults are used for \fIstart\fR and \fIend\fR if
 510 these optional fields are not specified.
 511 .sp
 512 The \fItime\fR has the same format as \fIoffset\fR except that no leading sign
 513 ("-" or "+" ) is allowed. If \fItime\fR is not specified, the default value is
 514 02:00:00.
 515 .RE
 516 
 517 .RE
 518 
 519 .SH SEE ALSO
 520 .sp
 521 .LP
 522 \fBcat\fR(1), \fBdate\fR(1), \fBed\fR(1), \fBfmtmsg\fR(1), \fBlocaledef\fR(1),
 523 \fBlogin\fR(1), \fBls\fR(1), \fBmkmsgs\fR(1), \fBnice\fR(1), \fBnohup\fR(1),
 524 \fBsh\fR(1), \fBsort\fR(1), \fBtime\fR(1), \fBvi\fR(1), \fBexec\fR(2),
 525 \fBaddseverity\fR(3C), \fBcatopen\fR(3C), \fBctime\fR(3C), \fBctype\fR(3C),
 526 \fBfmtmsg\fR(3C), \fBgetdate\fR(3C), \fBgetnetpath\fR(3NSL), \fBgettext\fR(3C),
 527 \fBgettxt\fR(3C), \fBlocaleconv\fR(3C), \fBmblen\fR(3C), \fBmktime\fR(3C),

 528 \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)
   1 '\" te
   2 .\" Copyright 1989 AT&T
   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>
   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.
   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.
   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]
   9 .TH ENVIRON 5 "Jun 26, 2014"
  10 .SH NAME
  11 environ \- user environment
  12 .SH DESCRIPTION

  13 .LP
  14 When a process begins execution, one of the \fBexec\fR family of functions
  15 makes available an array of strings called the environment; see \fBexec\fR(2).
  16 By convention, these strings have the form \fIvariable=value\fR, for example,
  17 \fBPATH=/sbin:/usr/sbin\fR. These environmental variables provide a way to make
  18 information about a program's environment available to programs.

  19 .LP
  20 A name may be placed in the environment by the \fBexport\fR command and
  21 \fIname\fR=\fIvalue\fR arguments in \fBsh\fR(1), or by one of the \fBexec\fR
  22 functions. It is unwise to conflict with certain shell variables such as
  23 \fBMAIL\fR, \fBPS1\fR, \fBPS2\fR, and \fBIFS\fR that are frequently exported by
  24 \fB\&.profile\fR files; see \fBprofile\fR(4).

  25 .LP
  26 The following environmental variables can be used by applications and are
  27 expected to be set in the target run-time environment.
  28 .sp
  29 .ne 2
  30 .na
  31 \fB\fBHOME\fR\fR
  32 .ad
  33 .sp .6
  34 .RS 4n
  35 The name of the user's login directory, set by \fBlogin\fR(1) from the password
  36 file; see \fBpasswd\fR(4).
  37 .RE
  38 
  39 .sp
  40 .ne 2
  41 .na
  42 \fB\fBLANG\fR\fR
  43 .ad
  44 .sp .6
  45 .RS 4n
  46 The string used to specify internationalization information that allows users
  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 the \fBlocale\fR argument.  \fBLANG\fR is used as the default locale if the
  51 corresponding environment variable for a particular category is unset or null.
  52 If, however,  \fBLC_ALL\fR is set to a valid, non-empty value, its contents are
  53 used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. For
  54 example, when invoked as \fBsetlocale(LC_CTYPE, "")\fR, \fBsetlocale()\fR will
  55 query the \fBLC_CTYPE\fR environment variable first to see if it is set and
  56 non-null. If \fBLC_CTYPE\fR is not set or null, then \fBsetlocale()\fR will
  57 check the \fBLANG\fR environment variable to see if it is set and non-null. If
  58 both \fBLANG\fR and \fBLC_CTYPE\fR are unset or \fINULL\fR, the default "C"
  59 locale will be used to set the \fBLC_CTYPE\fR category.
  60 .sp
  61 Most commands will invoke \fBsetlocale(LC_ALL, "")\fR prior to any other
  62 processing. This allows the command to be used with different national
  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.
  67 .sp
  68 The following environment variables correspond to each category of
  69 \fBsetlocale\fR(3C):
  70 .sp
  71 .ne 2
  72 .na
  73 \fB\fBLC_ALL\fR\fR
  74 .ad
  75 .sp .6
  76 .RS 4n
  77 If set to a valid, non-empty string value, override the values of \fBLANG\fR
  78 and all the other \fBLC_*\fRvariables.
  79 .RE
  80 
  81 .sp
  82 .ne 2
  83 .na
  84 \fB\fBLC_COLLATE\fR\fR
  85 .ad
  86 .sp .6


 503 .sp .6
 504 .RS 4n
 505 The \fId\fR^th day, (0 \(<= \fId\fR \(<= 6) of week \fIn\fR of month \fIm\fR of
 506 the year (1 \(<= \fIn\fR \(<= 5, 1 \(<= \fIm\fR \(<= 12), where week 5 means
 507 "the last \fId\fR-day in month \fIm\fR" which may occur in either the fourth or
 508 the fifth week). Week 1 is the first week in which the \fId\fR^th day occurs.
 509 Day zero is Sunday.
 510 .RE
 511 
 512 Implementation specific defaults are used for \fIstart\fR and \fIend\fR if
 513 these optional fields are not specified.
 514 .sp
 515 The \fItime\fR has the same format as \fIoffset\fR except that no leading sign
 516 ("-" or "+" ) is allowed. If \fItime\fR is not specified, the default value is
 517 02:00:00.
 518 .RE
 519 
 520 .RE
 521 
 522 .SH SEE ALSO

 523 .LP
 524 \fBcat\fR(1), \fBdate\fR(1), \fBed\fR(1), \fBfmtmsg\fR(1), \fBlocaledef\fR(1),
 525 \fBlogin\fR(1), \fBls\fR(1), \fBmkmsgs\fR(1), \fBnice\fR(1), \fBnohup\fR(1),
 526 \fBsh\fR(1), \fBsort\fR(1), \fBtime\fR(1), \fBvi\fR(1), \fBexec\fR(2),
 527 \fBaddseverity\fR(3C), \fBcatopen\fR(3C), \fBctime\fR(3C), \fBctype\fR(3C),
 528 \fBfmtmsg\fR(3C), \fBgetdate\fR(3C), \fBgetnetpath\fR(3NSL), \fBgettext\fR(3C),
 529 \fBgettxt\fR(3C), \fBlocaleconv\fR(3C), \fBmblen\fR(3C), \fBmktime\fR(3C),
 530 \fBnewlocale\fR(3C),
 531 \fBprintf\fR(3C), \fBsetlocale\fR(3C), \fBstrcoll\fR(3C), \fBstrftime\fR(3C),
 532 \fBstrtod\fR(3C), \fBstrxfrm\fR(3C), \fBuselocale\fR(3C), \fBTIMEZONE\fR(4),
 533 \fBnetconfig\fR(4), \fBpasswd\fR(4), \fBprofile\fR(4)