📄 localedef.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>localedef</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="localedef"></a> <a name="tag_04_77"></a><!-- localedef --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright © 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_04_77_01"></a>NAME</h4><blockquote>localedef - define locale environment</blockquote><h4><a name="tag_04_77_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><code><tt>localedef</tt> <b>[</b><tt>-c</tt><b>][</b><tt>-f</tt> <i>charmap</i><b>][</b><tt>-i</tt><i>sourcefile</i><b>][</b><tt>-u</tt> <i>code_set_name</i><b>]</b> <i>name</i></code></p></blockquote><h4><a name="tag_04_77_03"></a>DESCRIPTION</h4><blockquote><p>The <i>localedef</i> utility shall convert source definitions for locale categories into a format usable by the functions andutilities whose operational behavior is determined by the setting of the locale environment variables defined in the BaseDefinitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap07.html">Chapter 7, Locale</a>. It isimplementation-defined whether users have the capability to create new locales, in addition to those supplied by theimplementation. If the symbolic constant POSIX2_LOCALEDEF is defined, the system supports the creation of new locales. <sup>[<ahref="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> OnXSI-conformant systems, the symbolic constant POSIX2_LOCALEDEF shall be defined. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>The utility shall read source definitions for one or more locale categories belonging to the same locale from the file named inthe <b>-i</b> option (if specified) or from standard input.</p><p>The <i>name</i> operand identifies the target locale. The utility shall support the creation of <i>public</i>, or generallyaccessible locales, as well as <i>private</i>, or restricted-access locales. Implementations may restrict the capability to createor modify public locales to users with the appropriate privileges.</p><p>Each category source definition shall be identified by the corresponding environment variable name and terminated by an<b>END</b> <i>category-name</i> statement. The following categories shall be supported. In addition, the input may contain sourcefor implementation-defined categories.</p><dl compact><dt><i>LC_CTYPE</i></dt><dd>Defines character classification and case conversion.</dd><dt><i>LC_COLLATE</i></dt><dd><br>Defines collation rules.</dd><dt><i>LC_MONETARY</i></dt><dd><br>Defines the format and symbols used in formatting of monetary information.</dd><dt><i>LC_NUMERIC</i></dt><dd><br>Defines the decimal delimiter, grouping, and grouping symbol for non-monetary numeric editing.</dd><dt><i>LC_TIME</i></dt><dd>Defines the format and content of date and time information.</dd><dt><i>LC_MESSAGES</i></dt><dd><br>Defines the format and values of affirmative and negative responses.</dd></dl></blockquote><h4><a name="tag_04_77_04"></a>OPTIONS</h4><blockquote><p>The <i>localedef</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p><p>The following options shall be supported:</p><dl compact><dt><b>-c</b></dt><dd>Create permanent output even if warning messages have been issued.</dd><dt><b>-f </b> <i>charmap</i></dt><dd>Specify the pathname of a file containing a mapping of character symbols and collating element symbols to actual characterencodings. The format of the <i>charmap</i> is described in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap06.html#tag_06_04">Section 6.4, Character Set Description File</a>. The application shall ensure that thisoption is specified if symbolic names (other than collating symbols defined in a <b>collating-symbol</b> keyword) are used. If the<b>-f</b> option is not present, an implementation-defined character mapping shall be used.</dd><dt><b>-i </b> <i>inputfile</i></dt><dd>The pathname of a file containing the source definitions. If this option is not present, source definitions shall be read fromstandard input. The format of the <i>inputfile</i> is described in the Base Definitions volume of IEEE Std 1003.1-2001,<a href="../basedefs/xbd_chap07.html#tag_07_03">Section 7.3, Locale Definition</a>.</dd><dt><b>-u </b> <i>code_set_name</i></dt><dd><br>Specify the name of a codeset used as the target mapping of character symbols and collating element symbols whose encoding valuesare defined in terms of the ISO/IEC 10646-1:2000 standard position constant values.</dd></dl></blockquote><h4><a name="tag_04_77_05"></a>OPERANDS</h4><blockquote><p>The following operand shall be supported:</p><dl compact><dt><i>name</i></dt><dd>Identifies the locale; see the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap07.html">Chapter 7, Locale</a> for a description of the use of this name. If the name contains one or moreslash characters, <i>name</i> shall be interpreted as a pathname where the created locale definitions shall be stored. If<i>name</i> does not contain any slash characters, the interpretation of the name is implementation-defined and the locale shall bepublic. This capability may be restricted to users with appropriate privileges. (As a consequence of specifying one <i>name</i>,although several categories can be processed in one execution, only categories belonging to the same locale can be processed.)</dd></dl></blockquote><h4><a name="tag_04_77_06"></a>STDIN</h4><blockquote><p>Unless the <b>-i</b> option is specified, the standard input shall be a text file containing one or more locale category sourcedefinitions, as described in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap07.html#tag_07_03">Section 7.3, Locale Definition</a>. When lines are continued using the escape charactermechanism, there is no limit to the length of the accumulated continued line.</p></blockquote><h4><a name="tag_04_77_07"></a>INPUT FILES</h4><blockquote><p>The character set mapping file specified as the <i>charmap</i> option-argument is described in the Base Definitions volume ofIEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap06.html#tag_06_04">Section 6.4, Character Set Description File</a>. Ifa locale category source definition contains a <b>copy</b> statement, as defined in the Base Definitions volume ofIEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap07.html">Chapter 7, Locale</a>, and the <b>copy</b> statement names avalid, existing locale, then <i>localedef</i> shall behave as if the source definition had contained a valid category sourcedefinition for the named locale.</p></blockquote><h4><a name="tag_04_77_08"></a>ENVIRONMENT VARIABLES</h4><blockquote><p>The following environment variables shall affect the execution of <i>localedef</i>:</p><dl compact><dt><i>LANG</i></dt><dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume ofIEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> forthe precedence of internationalization variables used to determine the values of locale categories.)</dd><dt><i>LC_ALL</i></dt><dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd><dt><i>LC_COLLATE</i></dt><dd><br>(This variable has no affect on <i>localedef</i>; the POSIX locale is used for this category.)</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte asopposed to multi-byte characters in arguments and input files). This variable has no affect on the processing of <i>localedef</i>input data; the POSIX locale is used for this purpose, regardless of the value of this variable.</dd><dt><i>LC_MESSAGES</i></dt>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -