⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 localedef.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>localedef</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_1194">&nbsp;</a>NAME</h4><blockquote>localedef - define locale environment</blockquote><h4><a name = "tag_001_014_1195">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>localedef <b>[</b>-c<b>][</b>-f <i>charmap</i><b>][</b>-i <i>sourcefile</i><b>]</b><i> name</i></code></pre></blockquote><h4><a name = "tag_001_014_1196">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>localedef</i>utility converts source definitions for locale categories into a formatusable by the functions and utilities whose operational behaviour isdetermined by the setting of the locale environment variables defined inthe <b>XBD</b> specification, <a href="../xbd/locale.html"><b>Locale</b>&nbsp;</a> .It is implementation-dependent whether users have thecapability to create new locales, in addition to those suppliedby the implementation.Since the symbolic constant{POSIX2_LOCALEDEF}is defined on all XSI-conformant systems,the system supports the creation of new locales.<p>The utility reads source definitions for one or more locale categoriesbelonging to the same locale from the file named in the<b>-i</b>option (if specified) or from standard input.<p>The<i>name</i>operand identifies the target locale.The utility supports the creation of<i>public ,</i>or generally accessible locales, as well as<i>private ,</i>or restricted-access locales.Implementations may restrict the capability to create or modifypublic locales to users with the appropriate privileges.<p>Each category source definition is identified by the correspondingenvironment variable name and terminated by an<b>END</b><i>category-name</i>statement.The following categories are supported.In addition, the input may contain source for implementation-dependentcategories.<dl compact><dt>LC_CTYPE<dd>Defines character classification and case conversion.<dt>LC_COLLATE<dd>Defines collation rules.<dt>LC_MONETARY<dd>Defines the format and symbols used in formatting of monetaryinformation.<dt>LC_NUMERIC<dd>Defines the decimal delimiter, grouping and grouping symbol fornon-monetary numeric editing.<dt>LC_TIME<dd>Defines the format and content of date and time information.<dt>LC_MESSAGES<dd>Defines the format and values of affirmative and negative responses.</dl></blockquote><h4><a name = "tag_001_014_1197">&nbsp;</a>OPTIONS</h4><blockquote>The<i>localedef</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> .<p>The following options are supported:<dl compact><dt><b>-c&nbsp;</b><dd><dt><b>-c&nbsp;</b><i>(null)</i><dd>Create permanent output even if warning messages have been issued.<dt><b>-f&nbsp;</b><i>charmap</i><dd>Specify the pathname of a filecontaining a mapping of character symbols andcollating element symbols to actual character encodings.The format of the<i>charmap</i>is described underthe <b>XBD</b> specification, <a href="../xbd/charset.html#tag_001_004"><b>Character Set Description File</b>&nbsp;</a> .This option must be specified if symbolic names (other thancollating symbols defined in a<b>collating-symbol</b>keyword) are used.If the<b>-f</b>option is not present, an implementation-dependentcharacter mapping will be used.<dt><b>-i&nbsp;</b><i>inputfile</i><dd>The pathname of a file containing the source definitions.If this option is not present, source definitions will be read fromstandard input.The format of the<i>inputfile</i>is described inthe <b>XBD</b> specification, <a href="../xbd/locale.html#tag_005_003"><b>Locale Definitions</b>&nbsp;</a> .</dl></blockquote><h4><a name = "tag_001_014_1198">&nbsp;</a>OPERANDS</h4><blockquote>The following operand is supported:<dl compact><dt><i>name</i><dd>Identifies the locale.Seethe <b>XBD</b> specification, <a href="../xbd/locale.html"><b>Locale</b>&nbsp;</a> for a description of the use of this name.If the name contains one or more slash characters,<i>name</i>will be interpreted as a pathnamewhere the created locale definitions will be stored.If<i>name</i>does not contain any slashcharacters, the interpretation of the name isimplementation-dependentand the locale will be public.This capability may be restricted to users with appropriate privileges.(As a consequence of specifying one<i>name</i>,although severalcategories can be processed in one execution, only categories belongingto the same locale can be processed.)</dl></blockquote><h4><a name = "tag_001_014_1199">&nbsp;</a>STDIN</h4><blockquote>Unless the<b>-i</b>option is specified, the standard inputmust be a text file containing one or more locale category sourcedefinitions, as described inthe <b>XBD</b> specification, <a href="../xbd/locale.html#tag_005_003"><b>Locale Definitions</b>&nbsp;</a> .When lines are continued using the escape character mechanism,there is no limit to the length of the accumulated continued line.</blockquote><h4><a name = "tag_001_014_1200">&nbsp;</a>INPUT FILES</h4><blockquote>The character set mapping filespecified as the<i>charmap</i>option-argument is described underthe <b>XBD</b> specification, <a href="../xbd/charset.html#tag_001_004"><b>Character Set Description File</b>&nbsp;</a> .If a locale category source definition contains a<b>copy</b>statement,as defined inthe <b>XBD</b> specification, <a href="../xbd/locale.html"><b>Locale</b>&nbsp;</a> ,and the<b>copy</b>statement names a valid, existinglocale, then<i>localedef</i>will behave as if the source definitionhad contained a valid category source definition for the named locale.</blockquote><h4><a name = "tag_001_014_1201">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>localedef</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_COLLATE</i><dd>(This variable has no affect on<i>localedef</i>;the POSIX locale will be used for this category.)<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin 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.<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_1202">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_1203">&nbsp;</a>STDOUT</h4><blockquote>The utility will report all categories successfully processed,in an unspecified format.</blockquote><h4><a name = "tag_001_014_1204">&nbsp;</a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_1205">&nbsp;</a>OUTPUT FILES</h4><blockquote>The format of the created output is unspecified.If the<i>name</i>operand does not contain a slash,the existence of an output file for the locale is unspecified.</blockquote><h4><a name = "tag_001_014_1206">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1207">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>No errors occurred and the locales were successfully created.<dt>1<dd>Warnings occurred and the locales were successfully created.<dt>2<dd>The locale specification exceeded implementation limitsor the coded character set or sets used were not supportedby the implementation, and no locale was created.<dt>3<dd>The capability to create new locales is not supported bythe implementation.<dt>&gt;3<dd>Warnings or errors occurred and no output was created.</dl></blockquote><h4><a name = "tag_001_014_1208">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>If an error is detected, no permanent output will be created.<p>If warnings occur, permanent output will be created if the<b>-c</b>option was specified.The following conditions will cause warning messagesto be issued:<ul><p><li>If a symbolic name not found in the<i>charmap</i>file is used for the descriptions of the LC_CTYPE or LC_COLLATEcategories (for other categories, this will be an error condition).<p><li>If the number of operands to the<b>order</b>keyword exceeds the{COLL_WEIGHTS_MAX}limit.<p><li>If optional keywords not supported by the implementationare present in the source.<p></ul><p>Other implementation-dependent conditions may also cause warnings.</blockquote><h4><a name = "tag_001_014_1209">&nbsp;</a>APPLICATION USAGE</h4><blockquote>The<i>charmap</i>definition is optional, and is contained outside the locale definition.This allows both completely self-defined sourcefiles, and generic sources (applicable to more than one codeset).To aid portability, all<i>charmap</i>definitions must use the same symbolic names for the portable character set.As explained inthe <b>XBD</b> specification, <a href="../xbd/charset.html#tag_001_004"><b>Character Set Description File</b>&nbsp;</a> ,it is implementation-dependent whether or not users or applications canprovide additional character set description files.Therefore, the<b>-f</b>option might be operable only when an implementation-dependent<i>charmap</i>is named.</blockquote><h4><a name = "tag_001_014_1210">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1211">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1212">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="locale.html">locale</a></i>,the <b>XBD</b> specification, <a href="../xbd/locale.html#tag_005_003"><b>Locale Definitions</b>&nbsp;</a> .</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -