logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

localedef.1p (12176B)


  1. '\" et
  2. .TH LOCALEDEF "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. localedef \(em define locale environment
  12. .SH SYNOPSIS
  13. .LP
  14. .nf
  15. localedef \fB[\fR-c\fB] [\fR-f \fIcharmap\fB] [\fR-i \fIsourcefile\fB] [\fR-u \fIcode_set_name\fB] \fIname\fR
  16. .fi
  17. .SH DESCRIPTION
  18. The
  19. .IR localedef
  20. utility shall convert source definitions for locale categories into a
  21. format usable by the functions and utilities whose operational behavior
  22. is determined by the setting of the locale environment variables
  23. defined in the Base Definitions volume of POSIX.1\(hy2017,
  24. .IR "Chapter 7" ", " "Locale".
  25. It is implementation-defined whether users have the capability to create
  26. new locales, in addition to those supplied by the implementation. If
  27. the symbolic constant POSIX2_LOCALEDEF is defined, the system supports
  28. the creation of new locales.
  29. On XSI-conformant systems, the symbolic constant POSIX2_LOCALEDEF
  30. shall be defined.
  31. .P
  32. The utility shall read source definitions for one or more locale
  33. categories belonging to the same locale from the file named in the
  34. .BR \-i
  35. option (if specified) or from standard input.
  36. .P
  37. The
  38. .IR name
  39. operand identifies the target locale. The utility shall support the
  40. creation of
  41. .IR public ,
  42. or generally accessible locales, as well as
  43. .IR private ,
  44. or restricted-access locales. Implementations may restrict the
  45. capability to create or modify public locales to users with
  46. appropriate privileges.
  47. .P
  48. Each category source definition shall be identified by the
  49. corresponding environment variable name and terminated by an
  50. .BR END
  51. .IR category-name
  52. statement. The following categories shall be supported. In addition,
  53. the input may contain source for implementation-defined categories.
  54. .IP "\fILC_CTYPE\fR" 10
  55. Defines character classification and case conversion.
  56. .IP "\fILC_COLLATE\fR" 10
  57. .br
  58. Defines collation rules.
  59. .IP "\fILC_MONETARY\fR" 10
  60. .br
  61. Defines the format and symbols used in formatting of monetary
  62. information.
  63. .IP "\fILC_NUMERIC\fR" 10
  64. .br
  65. Defines the decimal delimiter, grouping, and grouping symbol for
  66. non-monetary numeric editing.
  67. .IP "\fILC_TIME\fR" 10
  68. Defines the format and content of date and time information.
  69. .IP "\fILC_MESSAGES\fR" 10
  70. .br
  71. Defines the format and values of affirmative and negative responses.
  72. .SH OPTIONS
  73. The
  74. .IR localedef
  75. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  76. .IR "Section 12.2" ", " "Utility Syntax Guidelines".
  77. .P
  78. The following options shall be supported:
  79. .IP "\fB\-c\fP" 10
  80. Create permanent output even if warning messages have been issued.
  81. .IP "\fB\-f\ \fIcharmap\fR" 10
  82. Specify the pathname of a file containing a mapping of character
  83. symbols and collating element symbols to actual character encodings.
  84. The format of the
  85. .IR charmap
  86. is described in the Base Definitions volume of POSIX.1\(hy2017,
  87. .IR "Section 6.4" ", " "Character Set Description File".
  88. The application shall ensure that this option is specified if symbolic
  89. names (other than collating symbols defined in a
  90. .BR collating-symbol
  91. keyword) are used. If the
  92. .BR \-f
  93. option is not present, an implementation-defined character mapping
  94. shall be used.
  95. .IP "\fB\-i\ \fIinputfile\fR" 10
  96. The pathname of a file containing the source definitions. If this
  97. option is not present, source definitions shall be read from standard
  98. input. The format of the
  99. .IR inputfile
  100. is described in the Base Definitions volume of POSIX.1\(hy2017,
  101. .IR "Section 7.3" ", " "Locale Definition".
  102. .IP "\fB\-u\ \fIcode_set_name\fR" 10
  103. .br
  104. Specify the name of a codeset used as the target mapping of character
  105. symbols and collating element symbols whose encoding values are defined
  106. in terms of the ISO/IEC\ 10646\(hy1:\|2000 standard position constant values.
  107. .SH OPERANDS
  108. The following operand shall be supported:
  109. .IP "\fIname\fR" 10
  110. Identifies the locale; see the Base Definitions volume of POSIX.1\(hy2017,
  111. .IR "Chapter 7" ", " "Locale"
  112. for a description of the use of this name. If the name contains one
  113. or more
  114. <slash>
  115. characters,
  116. .IR name
  117. shall be interpreted as a pathname where the created locale definitions
  118. shall be stored. If
  119. .IR name
  120. does not contain any
  121. <slash>
  122. characters, the interpretation of the name is implementation-defined
  123. and the locale shall be public. The ability to create public locales in
  124. this way may be restricted to users with appropriate privileges. (As a
  125. consequence of specifying one
  126. .IR name ,
  127. although several categories can be processed in one execution, only
  128. categories belonging to the same locale can be processed.)
  129. .SH STDIN
  130. Unless the
  131. .BR \-i
  132. option is specified, the standard input shall be a text file containing
  133. one or more locale category source definitions, as described in the Base Definitions volume of POSIX.1\(hy2017,
  134. .IR "Section 7.3" ", " "Locale Definition".
  135. When lines are continued using the escape character mechanism,
  136. there is no limit to the length of the accumulated continued line.
  137. .SH "INPUT FILES"
  138. The character set mapping file specified as the
  139. .IR charmap
  140. option-argument is described in the Base Definitions volume of POSIX.1\(hy2017,
  141. .IR "Section 6.4" ", " "Character Set Description File".
  142. If a locale category source definition contains a
  143. .BR copy
  144. statement, as defined in the Base Definitions volume of POSIX.1\(hy2017,
  145. .IR "Chapter 7" ", " "Locale",
  146. and the
  147. .BR copy
  148. statement names a valid, existing locale, then
  149. .IR localedef
  150. shall behave as if the source definition had contained a valid category
  151. source definition for the named locale.
  152. .SH "ENVIRONMENT VARIABLES"
  153. The following environment variables shall affect the execution of
  154. .IR localedef :
  155. .IP "\fILANG\fP" 10
  156. Provide a default value for the internationalization variables that are
  157. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  158. .IR "Section 8.2" ", " "Internationalization Variables"
  159. for the precedence of internationalization variables used to determine
  160. the values of locale categories.)
  161. .IP "\fILC_ALL\fP" 10
  162. If set to a non-empty string value, override the values of all the
  163. other internationalization variables.
  164. .IP "\fILC_COLLATE\fP" 10
  165. .br
  166. (This variable has no affect on
  167. .IR localedef ;
  168. the POSIX locale is used for this category.)
  169. .IP "\fILC_CTYPE\fP" 10
  170. Determine the locale for the interpretation of sequences of bytes of
  171. text data as characters (for example, single-byte as opposed to
  172. multi-byte characters in arguments and input files). This variable has
  173. no affect on the processing of
  174. .IR localedef
  175. input data; the POSIX locale is used for this purpose, regardless of
  176. the value of this variable.
  177. .IP "\fILC_MESSAGES\fP" 10
  178. .br
  179. Determine the locale that should be used to affect the format and
  180. contents of diagnostic messages written to standard error.
  181. .IP "\fINLSPATH\fP" 10
  182. Determine the location of message catalogs for the processing of
  183. .IR LC_MESSAGES .
  184. .SH "ASYNCHRONOUS EVENTS"
  185. Default.
  186. .SH STDOUT
  187. The utility shall report all categories successfully processed, in an
  188. unspecified format.
  189. .SH STDERR
  190. The standard error shall be used only for diagnostic messages.
  191. .SH "OUTPUT FILES"
  192. The format of the created output is unspecified. If the
  193. .IR name
  194. operand does not contain a
  195. <slash>,
  196. the existence of an output file for the locale is unspecified.
  197. .SH "EXTENDED DESCRIPTION"
  198. When the
  199. .BR \-u
  200. option is used, the
  201. .IR code_set_name
  202. option-argument shall be interpreted as an implementation-defined
  203. name of a codeset to which the ISO/IEC\ 10646\(hy1:\|2000 standard position constant values shall be
  204. converted via an implementation-defined method. Both the ISO/IEC\ 10646\(hy1:\|2000 standard
  205. position constant values and other formats (decimal, hexadecimal, or
  206. octal) shall be valid as encoding values within the
  207. .IR charmap
  208. file. The codeset represented by the implementation-defined name can
  209. be any codeset that is supported by the implementation.
  210. .P
  211. When conflicts occur between the
  212. .IR charmap
  213. specification of <\fIcode_set_name\fP>, <\fImb_cur_max\fP>, or
  214. <\fImb_cur_min\fP> and the implementation-defined interpretation of
  215. these respective items for the codeset represented by the
  216. .BR \-u
  217. option-argument
  218. .IR code_set_name ,
  219. the result is unspecified.
  220. .P
  221. When conflicts occur between the
  222. .IR charmap
  223. encoding values specified for symbolic names of characters of the
  224. portable character set and the implementation-defined assignment of
  225. character encoding values, the result is unspecified.
  226. .P
  227. If a non-printable character in the
  228. .IR charmap
  229. has a width specified that is not
  230. .BR \-1 ,
  231. the result will be undefined.
  232. .SH "EXIT STATUS"
  233. The following exit values shall be returned:
  234. .IP "\00" 6
  235. No errors occurred and the locales were successfully created.
  236. .IP "\01" 6
  237. Warnings occurred and the locales were successfully created.
  238. .IP "\02" 6
  239. The locale specification exceeded implementation limits or the coded
  240. character set or sets used were not supported by the implementation,
  241. and no locale was created.
  242. .IP "\03" 6
  243. The capability to create new locales is not supported by the
  244. implementation.
  245. .IP >3 6
  246. Warnings or errors occurred and no output was created.
  247. .SH "CONSEQUENCES OF ERRORS"
  248. If an error is detected, no permanent output shall be created.
  249. .P
  250. If warnings occur, permanent output shall be created if the
  251. .BR \-c
  252. option was specified. The following conditions shall cause warning
  253. messages to be issued:
  254. .IP " *" 4
  255. If a symbolic name not found in the
  256. .IR charmap
  257. file is used for the descriptions of the
  258. .IR LC_CTYPE
  259. or
  260. .IR LC_COLLATE
  261. categories (for other categories, this shall be an error condition).
  262. .IP " *" 4
  263. If the number of operands to the
  264. .BR order
  265. keyword exceeds the
  266. {COLL_WEIGHTS_MAX}
  267. limit.
  268. .IP " *" 4
  269. If optional keywords not supported by the implementation are present in
  270. the source.
  271. .P
  272. Other implementation-defined conditions may also cause warnings.
  273. .LP
  274. .IR "The following sections are informative."
  275. .SH "APPLICATION USAGE"
  276. The
  277. .IR charmap
  278. definition is optional, and is contained outside the locale
  279. definition. This allows both completely self-defined source files, and
  280. generic sources (applicable to more than one codeset). To aid
  281. portability, all
  282. .IR charmap
  283. definitions must use the same symbolic names for the portable character
  284. set. As explained in the Base Definitions volume of POSIX.1\(hy2017,
  285. .IR "Section 6.4" ", " "Character Set Description File",
  286. it is implementation-defined whether or not users or applications can
  287. provide additional character set description files. Therefore, the
  288. .BR \-f
  289. option might be operable only when an implementation-defined
  290. .IR charmap
  291. is named.
  292. .SH EXAMPLES
  293. None.
  294. .SH RATIONALE
  295. The output produced by the
  296. .IR localedef
  297. utility is implementation-defined. The
  298. .IR name
  299. operand is used to identify the specific locale. (As a consequence,
  300. although several categories can be processed in one execution, only
  301. categories belonging to the same locale can be processed.)
  302. .SH "FUTURE DIRECTIONS"
  303. None.
  304. .SH "SEE ALSO"
  305. .IR "\fIlocale\fR\^"
  306. .P
  307. The Base Definitions volume of POSIX.1\(hy2017,
  308. .IR "Section 6.4" ", " "Character Set Description File",
  309. .IR "Chapter 7" ", " "Locale",
  310. .IR "Chapter 8" ", " "Environment Variables",
  311. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  312. .\"
  313. .SH COPYRIGHT
  314. Portions of this text are reprinted and reproduced in electronic form
  315. from IEEE Std 1003.1-2017, Standard for Information Technology
  316. -- Portable Operating System Interface (POSIX), The Open Group Base
  317. Specifications Issue 7, 2018 Edition,
  318. Copyright (C) 2018 by the Institute of
  319. Electrical and Electronics Engineers, Inc and The Open Group.
  320. In the event of any discrepancy between this version and the original IEEE and
  321. The Open Group Standard, the original IEEE and The Open Group Standard
  322. is the referee document. The original Standard can be obtained online at
  323. http://www.opengroup.org/unix/online.html .
  324. .PP
  325. Any typographical or formatting errors that appear
  326. in this page are most likely
  327. to have been introduced during the conversion of the source files to
  328. man page format. To report such errors, see
  329. https://www.kernel.org/doc/man-pages/reporting_bugs.html .