OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man5 / locale.5
index 111fccc..7af414f 100644 (file)
@@ -1,3 +1,4 @@
+'\" t -*- coding: UTF-8 -*-
 .\" Copyright (C) 1994  Jochen Hein (Hein@Student.TU-Clausthal.de)
 .\" Copyright (C) 2008  Petr Baudis (pasky@suse.cz)
 .\" Copyright (C) 2014 Michael Kerrisk <mtk@manpages@gmail.com>
@@ -21,7 +22,7 @@
 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
 .\"     LC_TIME: Describe first_weekday and first_workday
 .\"
-.TH LOCALE 5 2014-05-23 "Linux" "Linux User Manual"
+.TH LOCALE 5 2015-01-22 "Linux" "Linux User Manual"
 .SH NAME
 locale \- describes a locale definition file
 .SH DESCRIPTION
@@ -54,7 +55,22 @@ can be defined from scratch.
 If the category should be copied,
 the only valid keyword in the definition is
 .B copy
-followed by the name of the locale which should be copied.
+followed by the name of the locale in double quotes which should be
+copied.
+.PP
+When defining a category from scratch, all field descriptors and strings
+should be defined as Unicode code points in angle brackets, unless
+otherwise stated below.
+For example, "€" is to be presented as "<U20AC>", "%a" as
+"<U0025><U0061>", and "Monday" as
+"<U0053><U0075><U006E><U0064><U0061><U0079>".
+Values defined as Unicode code points must be in double quotes, plain
+number values are not quoted (but
+.BR LC_CTYPE
+and
+.BR LC_COLLATE
+follow special formatting, see the system-provided locale files for
+examples).
 .SS Locale category sections
 The following category sections are defined by POSIX:
 .IP * 3
@@ -84,6 +100,11 @@ the GNU C library supports the following nonstandard categories:
 .B LC_PAPER
 .IP *
 .B LC_TELEPHONE
+.PP
+See
+.BR locale (7)
+for a more detailed description of each category.
+
 .SS LC_ADDRESS
 The definition starts with the string
 .B LC_ADDRESS
@@ -106,6 +127,8 @@ The following field descriptors are recognized:
 .\" .B LC_NAME
 .\" .I name_fmt
 .\" keyword.
+.\"
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
 .TP
 %a
 Care of person, or organization.
@@ -146,6 +169,8 @@ Country designation, from the <country_post> keyword.
 .\"     BUG: %l escape sequence from ISO/IEC 14652:2002 is not
 .\"    supported by glibc
 .\" Local township within town or city.
+.\"
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
 .TP
 %z
 Zip number, postal code.
@@ -182,13 +207,13 @@ followed by the two-letter abbreviation of the country (ISO 3166).
 followed by the three-letter abbreviation of the country (ISO 3166).
 .TP
 .I country_num
-followed by the numeric country code (ISO 3166).
+followed by the numeric country code as plain numbers (ISO 3166).
 .TP
 .I country_car
 followed by the code for the country car number.
 .TP
 .I country_isbn
-followed by the ISBN code (for books).
+followed by the ISBN code as plain numbers (for books).
 .TP
 .I lang_name
 followed by the language name in the language of the current document.
@@ -217,12 +242,13 @@ The definition starts with the string
 in the first column.
 
 The following keywords are allowed:
-.\" FIXME translit_start + translit_end are not documented
-.\" FIXME 'charclass' is not documented
-.\" FIXME 'charconv' is not documented
-.\" FIXME 'outdigit' is not documented
-.\" FIXME 'include' is not documented
-.\" FIXME 'map' (to_inpunct, to_outpunct) is not documented
+.\" FIXME The following LC_CTYPE keywords are not documented:
+.\"    translit_start + translit_end
+.\"    charclass
+.\"    charconv
+.\"    outdigit
+.\"    include
+.\"    map (to_inpunct, to_outpunct)
 .TP
 .I upper
 followed by a list of uppercase letters.
@@ -411,20 +437,16 @@ The
 definition ends with the string
 .IR "END LC_CTYPE" .
 .SS LC_COLLATE
-.\" FIXME: the description of LC_COLLATE lacks a lot of details
-The
-.B LC_COLLATE
-category defines the rules for collating characters.
-Due to
-limitations of libc not all POSIX-options are implemented.
+Due to limitations of glibc not all POSIX-options are implemented.
 
 The definition starts with the string
 .B LC_COLLATE
 in the first column.
 
 The following keywords are allowed:
-.\" FIXME 'script' is not documented
-.\" FIXME 'symbol-equivalence' is not documented
+.\" FIXME The following LC_COLLATE keywords are not documented:
+.\"    script
+.\"    symbol-equivalence
 .TP
 .I collating-element
 followed by the definition of a collating-element symbol
@@ -445,22 +467,23 @@ or
 The order definition consists of lines that describe the order
 and is terminated with the keyword
 .IR order_end .
-.\" FIXME 'reorder-after' is not documented
-.\" FIXME 'reorder-end' is not documented
-.\" FIXME 'reorder-sections-after' is not documented
-.\" FIXME 'reorder-sections-end' is not documented
+.\" FIXME The following LC_COLLATE keywords are not documented:
+.\"    reorder-after
+.\"    reorder-end
+.\"    reorder-sections-after
+.\"    reorder-sections-end
 .PP
 The
 .B LC_COLLATE
 definition ends with the string
 .IR "END LC_COLLATE" .
 .SS LC_IDENTIFICATION
-This category contains meta-information about the locale definition.
-
 The definition starts with the string
 .B LC_IDENTIFICATION
 in the first column.
 
+The values in this category are defined as plain strings.
+
 The following keywords are allowed:
 .TP
 .I title
@@ -583,6 +606,16 @@ The definition starts with the string
 .B LC_MONETARY
 in the first column.
 
+Values for
+.IR int_curr_symbol ,
+.IR currency_symbol ,
+.IR mon_decimal_point ,
+.IR mon_thousands_sep ,
+.IR positive_sign ,
+and
+.IR negative_sign
+are defined as Unicode code points, the others as plain numbers.
+
 The following keywords are allowed:
 .TP
 .I int_curr_symbol
@@ -752,7 +785,7 @@ The same values are recognized as for
 .TP
 .I int_p_sign_posn
 followed by an integer that indicates where the
-.I negative_sign
+.I positive_sign
 should be placed for a nonnegative
 internationally formatted monetary quantity.
 The same values are recognized as for
@@ -874,8 +907,8 @@ followed by the string that will be used as a group separator
 when formatting numeric quantities.
 .TP
 .I grouping
-followed by a sequence of integers separated by semicolons that
-describe the formatting of numeric quantities.
+followed by a sequence of integers as plain numbers separated by
+semicolons that describe the formatting of numeric quantities.
 .IP
 Each integer specifies the number of digits in a group.
 The first integer defines the size of the group immediately
@@ -895,6 +928,8 @@ The definition starts with the string
 .B LC_PAPER
 in the first column.
 
+Values in this category are defined as plain numbers.
+
 The following keywords are allowed:
 .TP
 .I height
@@ -966,8 +1001,12 @@ The definition starts with the string
 in the first column.
 
 The following keywords are allowed:
-.\" FIXME 'era', 'era_d_fmt', 'era_d_t_fmt', 'era_t_fmt',  are not documented
-.\" FIXME 'timezone' is not documented
+.\" FIXME The following LC_TIME keywords are not documented:
+.\"    era
+.\"    era_d_fmt
+.\"    era_d_t_fmt
+.\"    era_t_fmt
+.\"    timezone
 .TP
 .I abday
 followed by a list of abbreviated names of the days of the week.
@@ -975,6 +1014,7 @@ The list starts with the first day of the week
 as specified by
 .I week
 (Sunday by default).
+See NOTES.
 .TP
 .I day
 followed by a list of names of the days of the week.
@@ -982,6 +1022,7 @@ The list starts with the first day of the week
 as specified by
 .I week
 (Sunday by default).
+See NOTES.
 .TP
 .I abmon
 followed by a list of abbreviated month names.
@@ -995,7 +1036,7 @@ followed by the appropriate representation of the
 and
 .B pm
 strings.
-This should be defined only for locales using AM/PM convention.
+This should be left empty for locales not using AM/PM convention.
 .TP
 .I d_t_fmt
 followed by the appropriate date and time format.
@@ -1008,10 +1049,10 @@ followed by the appropriate time format.
 .TP
 .I t_fmt_ampm
 followed by the appropriate time format when using 12h clock format.
-This should be defined only for locales using the AM/PM convention.
+This should be left empty for locales not using AM/PM convention.
 .TP
 .I week
-followed by a list of three values:
+followed by a list of three values as plain numbers:
 The number of days in a week (by default 7),
 a date of beginning of the week (by default corresponds to Sunday),
 and the minimal length of the first week in year (by default 4).
@@ -1020,16 +1061,7 @@ Regarding the start of the week,
 shall be used for Sunday and
 .B 19971201
 shall be used for Monday.
-Thus, countries using
-.B 19971130
-should have local Sunday name as the first day in the
-.I day
-list,
-while countries using
-.B 19971201
-should have Monday translation as the first item in the
-.I day
-list.
+See NOTES.
 .TP
 .IR first_weekday " (since glibc 2.2)"
 followed by the number of the first day from the
@@ -1037,21 +1069,24 @@ followed by the number of the first day from the
 list to be shown in calendar applications.
 The default value of
 .B 1
-corresponds to either Sunday or Monday depending
+(plain number) corresponds to either Sunday or Monday depending
 on the value of the second
 .I week
 list item.
+See NOTES.
 .TP
 .IR first_workday " (since glibc 2.2)"
 followed by the number of the first working day from the
 .I day
 list.
 The default value is
-.BR 2 .
+.BR 2
+(plain number).
+See NOTES.
 .TP
 .I cal_direction
 .\" from localedata/locales/uk_UA
-followed by a value that indicates the direction for the
+followed by a plain number value that indicates the direction for the
 display of calendar dates, as follows:
 .RS
 .TP
@@ -1082,6 +1117,52 @@ Usual default locale archive location.
 Usual default path for locale definition files.
 .SH CONFORMING TO
 POSIX.2, ISO/IEC TR 14652.
+.SH NOTES
+The collective GNU C library community wisdom regarding
+.IR abday ,
+.IR day ,
+.IR week ,
+.IR first_weekday ,
+and
+.I first_workday
+states at
+https://sourceware.org/glibc/wiki/Locales
+the following:
+.IP * 3
+The value of the second
+.I week
+list item specifies the base of the
+.I abday
+and
+.I day
+lists.
+.IP *
+.I first_weekday
+specifies the offset of the first day-of-week in the
+.I abday
+and
+.I day
+lists.
+.IP *
+For compatibility reasons, all glibc locales should set the value of the
+second
+.I week
+list item to
+.B 19971130
+(Sunday) and base the
+.I abday
+and
+.I day
+lists appropriately, and set
+.I first_weekday
+and
+.I first_workday
+to
+.B 1
+or
+.BR 2 ,
+depending on whether the week and work week actually starts on Sunday or
+Monday for the locale.
 .SH BUGS
 This manual page isn't complete.
 .\" .SH AUTHOR
@@ -1094,9 +1175,12 @@ This manual page isn't complete.
 .BR setlocale (3),
 .BR uselocale (3),
 .BR charmap (5),
-.BR locale (7)
+.BR charsets (7),
+.BR locale (7),
+.BR unicode (7),
+.BR utf-8 (7)
 .SH COLOPHON
-This page is part of release 3.68 of the Linux
+This page is part of release 3.79 of the Linux
 .I man-pages
 project.
 A description of the project,