1 .\" 2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for 3 .\" permission to reproduce portions of its copyrighted documentation. 4 .\" Original documentation from The Open Group can be obtained online at 5 .\" http://www.opengroup.org/bookstore/. 6 .\" 7 .\" The Institute of Electrical and Electronics Engineers and The Open 8 .\" Group, have given us permission to reprint portions of their 9 .\" documentation. 10 .\" 11 .\" In the following statement, the phrase ``this text'' refers to portions 12 .\" of the system documentation. 13 .\" 14 .\" Portions of this text are reprinted and reproduced in electronic form 15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition, 16 .\" Standard for Information Technology -- Portable Operating System 17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6, 18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics 19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy 20 .\" between these versions and the original IEEE and The Open Group 21 .\" Standard, the original IEEE and The Open Group Standard is the referee 22 .\" document. The original Standard can be obtained online at 23 .\" http://www.opengroup.org/unix/online.html. 24 .\" 25 .\" This notice shall appear on any product containing this material. 26 .\" 27 .\" The contents of this file are subject to the terms of the 28 .\" Common Development and Distribution License (the "License"). 29 .\" You may not use this file except in compliance with the License. 30 .\" 31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 32 .\" or http://www.opensolaris.org/os/licensing. 33 .\" See the License for the specific language governing permissions 34 .\" and limitations under the License. 35 .\" 36 .\" When distributing Covered Code, include this CDDL HEADER in each 37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 38 .\" If applicable, add the following below this CDDL HEADER, with the 39 .\" fields enclosed by brackets "[]" replaced with your own identifying 40 .\" information: Portions Copyright [yyyy] [name of copyright owner] 41 .\" 42 .\" 43 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved 44 .\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved 45 .\" Portions Copyright 2013 DEY Storage Systems, Inc. 46 .\" 47 .TH LOCALEDEF 1 "April 9, 2016" 48 .SH NAME 49 localedef \- define locale environment 50 .SH SYNOPSIS 51 .LP 52 .nf 53 \fBlocaledef\fR [\fB-c\fR] [\fB-v\fR] [\fB-U\fR\] [\fB-f\fR \fIcharmap\fR] 54 [\fB-w\fR \fIwidthfile\fR] [\fB-i\fR \fIsourcefile\fR] 55 [\fB-u\fR \fIcode_set_name\fR] \fIlocalename\fR 56 .fi 57 58 .SH DESCRIPTION 59 .LP 60 The \fBlocaledef\fR utility converts source definitions for locale categories 61 into a format usable by the functions and utilities whose operational behavior 62 is determined by the setting of the locale environment variables; see 63 \fBenviron\fR(5). 64 .sp 65 .LP 66 The utility reads source definitions for one or more locale categories 67 belonging to the same locale from the file named in the \fB-i\fR option (if 68 specified) or from standard input. 69 .sp 70 .LP 71 Each category source definition is identified by the corresponding environment 72 variable name and terminated by an \fBEND\fR \fIcategory-name\fR statement. The 73 following categories are supported. 74 .sp 75 .ne 2 76 .na 77 \fB\fBLC_CTYPE\fR\fR 78 .ad 79 .RS 15n 80 Defines character classification and case conversion. 81 .RE 82 83 .sp 84 .ne 2 85 .na 86 \fB\fBLC_COLLATE\fR\fR 87 .ad 88 .RS 15n 89 Defines collation rules. 90 .RE 91 92 .sp 93 .ne 2 94 .na 95 \fB\fBLC_MONETARY\fR\fR 96 .ad 97 .RS 15n 98 Defines the format and symbols used in formatting of monetary information. 99 .RE 100 101 .sp 102 .ne 2 103 .na 104 \fB\fBLC_NUMERIC\fR\fR 105 .ad 106 .RS 15n 107 Defines the decimal delimiter, grouping and grouping symbol for non-monetary 108 numeric editing. 109 .RE 110 111 .sp 112 .ne 2 113 .na 114 \fB\fBLC_TIME\fR\fR 115 .ad 116 .RS 15n 117 Defines the format and content of date and time information. 118 .RE 119 120 .sp 121 .ne 2 122 .na 123 \fB\fBLC_MESSAGES\fR\fR 124 .ad 125 .RS 15n 126 Defines the format and values of affirmative and negative responses. 127 .RE 128 129 .SH OPTIONS 130 .LP 131 The following options are supported: 132 .sp 133 .ne 2 134 .na 135 \fB\fB-c\fR\fR 136 .ad 137 .RS 23n 138 Creates permanent output even if warning messages have been issued. 139 .RE 140 141 .sp 142 .ne 2 143 .na 144 \fB\fB-v\fR\fR 145 .ad 146 .RS 23n 147 Emit verbose debugging output on standard output. 148 .RE 149 150 .sp 151 .ne 2 152 .na 153 \fB\fB-U\fR\fR 154 .ad 155 .RS 23n 156 Ignore the presence of character symbols that have no matching character 157 definition. This facilitates the use of a common locale definition file 158 to be used across multiple encodings, even when some symbols are not 159 present in a given encoding. 160 .sp 161 Support for this option is an illumos extension. 162 .RE 163 164 .sp 165 .ne 2 166 .na 167 \fB\fB-f\fR \fIcharmap\fR\fR 168 .ad 169 .RS 23n 170 Specifies the pathname of a file containing a mapping of character symbols and 171 collating element symbols to actual character encodings. This option must be 172 specified if symbolic names (other than collating symbols defined in a 173 \fBcollating-symbol\fR keyword) are used. If the \fB-f\fR option is not 174 present, the default character mapping will be used. 175 .RE 176 177 .sp 178 .ne 2 179 .na 180 \fB\fB-w\fR \fIwidthfile\fR\fR 181 .ad 182 .RS 23n 183 The path name of the file containing character screen width definitions. 184 If not supplied, then default screen widths will be assumed, which will 185 generally not account for East Asian encodings requiring more than a single 186 character cell to display, nor for combining or accent marks that occupy 187 no additional screen width. 188 .sp 189 The support for width files is an illumos extension. 190 .RE 191 192 .sp 193 .ne 2 194 .na 195 \fB\fB-i\fR \fIsourcefile\fR\fR 196 .ad 197 .RS 23n 198 The path name of a file containing the source definitions. If this option is 199 not present, source definitions will be read from standard input. 200 .RE 201 202 .sp 203 .ne 2 204 .na 205 \fB\fB-u\fR \fIcode_set_name\fR\fR 206 .ad 207 .RS 23n 208 Specifies the name of a codeset used as the target mapping of character symbols 209 and collating element symbols whose encoding values are defined in terms of the 210 ISO/IEC 10646-1: 2000 standard position constant values. See NOTES. 211 .RE 212 213 .SH OPERANDS 214 .LP 215 The following operand is supported: 216 .sp 217 .ne 2 218 .na 219 \fB\fIlocalename\fR\fR 220 .ad 221 .RS 14n 222 Identifies the locale. If the name contains one or more slash characters, 223 \fIlocalename\fR will be interpreted as a path name where the created locale 224 definitions will be stored. This capability may be restricted to users with 225 appropriate privileges. (As a consequence of specifying one \fIlocalename\fR, 226 although several categories can be processed in one execution, only categories 227 belonging to the same locale can be processed.) 228 .RE 229 230 .SH OUTPUT 231 .LP 232 \fBlocaledef\fR creates a directory of files that represents the locale's 233 data. The contants of this directory should generally be copied into the 234 appropriate subdirectory of /usr/lib/locale in order the definitions to 235 be visible to programs linked with libc. 236 .sp 237 .SH ENVIRONMENT VARIABLES 238 .LP 239 See \fBenviron\fR(5) for definitions of the following environment variables 240 that affect the execution of \fBlocaledef\fR: \fBLANG\fR, \fBLC_ALL\fR, 241 \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. 242 .SH EXIT STATUS 243 .LP 244 The following exit values are returned: 245 .sp 246 .ne 2 247 .na 248 \fB\fB0\fR\fR 249 .ad 250 .RS 6n 251 No errors occurred and the locales were successfully created. 252 .RE 253 254 .sp 255 .ne 2 256 .na 257 \fB\fB1\fR\fR 258 .ad 259 .RS 6n 260 Warnings occurred and the locales were successfully created. 261 .RE 262 263 .sp 264 .ne 2 265 .na 266 \fB\fB2\fR\fR 267 .ad 268 .RS 6n 269 The locale specification exceeded implementation limits or the coded character 270 set or sets used were not supported by the implementation, and no locale was 271 created. 272 .RE 273 274 .sp 275 .ne 2 276 .na 277 \fB\fB>3\fR\fR 278 .ad 279 .RS 6n 280 Warnings or errors occurred and no output was created. 281 .RE 282 283 .sp 284 .LP 285 If an error is detected, no permanent output will be created. 286 .SH FILES 287 .ne 2 288 .na 289 \fB/usr/lib/locale/\fR\fIlocalename\fR\fB/\fR 290 .ad 291 .sp .6 292 .RS 4n 293 The directory containing locale data. 294 .RE 295 296 .SH ATTRIBUTES 297 .LP 298 See \fBattributes\fR(5) for descriptions of the following attributes: 299 .sp 300 301 .sp 302 .TS 303 box; 304 c | c 305 l | l . 306 ATTRIBUTE TYPE ATTRIBUTE VALUE 307 _ 308 Interface Stability Standard 309 .TE 310 311 .SH SEE ALSO 312 .LP 313 \fBlocale\fR(1), \fBiconv_open\fR(3C), \fBnl_langinfo\fR(3C), 314 \fBstrftime\fR(3C), \fBattributes\fR(5), \fBcharmap\fR(5), \fBenviron\fR(5), 315 \fBextensions\fR(5), \fBlocale\fR(5), \fBstandards\fR(5) 316 .SH WARNINGS 317 .LP 318 If warnings occur, permanent output will be created if the \fB-c\fR option was 319 specified. The following conditions will cause warning messages to be issued: 320 .RS +4 321 .TP 322 .ie t \(bu 323 .el o 324 If a symbolic name not found in the \fIcharmap\fR file is used for the 325 descriptions of the \fBLC_CTYPE\fR or \fBLC_COLLATE\fR categories (for other 326 categories, this will be an error condition). 327 .RE 328 .RS +4 329 .TP 330 .ie t \(bu 331 .el o 332 If optional keywords not supported by the implementation are present in the 333 source. 334 .RE 335 .SH NOTES 336 .LP 337 When the \fB-u\fR option is used, the \fIcode_set_name\fR option-argument is 338 interpreted as a name of a codeset to which the ISO/IEC 10646-1: 2000 standard 339 position constant values are converted. Both the ISO/IEC 10646-1: 2000 standard 340 position constant values and other formats (decimal, hexadecimal, or octal) are 341 valid as encoding values within the charmap file. The codeset can be any 342 codeset that is supported by the \fBiconv_open\fR(3C) function on the system. 343 .sp 344 .LP 345 When conflicts occur between the charmap specification of \fIcode_set_name\fR, 346 \fImb_cur_max\fR, or \fImb_cur_min\fR and the corresponding value for the 347 codeset represented by the \fB-u\fR option-argument \fIcode_set_name\fR, the 348 \fBlocaledef\fR utility fails as an error. 349 .sp 350 .LP 351 When conflicts occur between the charmap encoding values specified for symbolic 352 names of characters of the portable character set and the character encoding 353 values defined by the US-ASCII, the result is unspecified.