POSIX locale for registration with ISO/IEC 15897

Source: Keld Simonsen
Date: 1999-07-19


At the New Orleans 1999 WG15 meeting I was given an action item 9901-15 to prepare for registrationof the POSIX locale, as found in ISO/IEC 9945-2:1993. I was actioned to try to do this in cooperation with the ISO C working group, WG14. I have now approached WG14 and can report that: "WG14 wishes to have their C locale registered by the appropriate registration authority. It notes that there are differences between the C and POSIX locale." The diferences are found in the specifications for d_t_fmt, d_fmt and am_pm in the LC_TIME category. They are:
                      Posix:                      C9X

d_t_fmt     "%a %b %e %H:%M:%S %Y"       "%A %B %d %T %Y"
            Mon Jul  3 15:44:55 1999     Monday July 03 15:44:55 1999

d_fmt       "%m/%d/%y"                   "%A %B %d %Y"
            07/03/99                     Monday July 03 1999

am_pm       "AM","PM"                    "am","pm"
The new C9X date formats are variable-width and not convenient for listings with dates such as logging records.

So there will be both a POSIX and a C locale. The procedure is then to produce the POSIX locale (which is ad verbatim as stated in ISO/IEC 9945-2:1993) and a narrative cultural specification, describing narratively the POSIX locale. This is done with this document.

The procedure for getting the locale registered is then:

POSIX locale, Narrative Cultural Specification

Users: general, applications: general
Source: ISO/IEC JTC1/SC22
Token identifier: posix,_1.3
POSIX-locale: posix,_1.3

Clause 1: Alphanumeric deterministic ordering

Ordering in the standard POSIX locale is according to the code point order of ISO/IEC 646:1993.

Clause 2: Classification of characters

The POSIX locale uses normal classification of characters, such as letters, digits, punctuation and control characters, and letters are mapped between uppercase and lowercase.

Clause 3: Numeric formatting

The decimal separator is FULL STOP "."
The thousands separator is void.
There is no grouping of large numbers.

Clause 4: Monetary formatting

The monetary formatting is not specified, as this specification should be usable in many international environments.

Clause 5: Date and time conventions

The weekday and month names are written with English names.

Weekday name Short weekday name
Sunday Sun
Monday Mon
Tuesday Tue
Wednesday Wed
Thursday Thu
Friday Fri
Saturday Sat
Month name Short month name
January Jan
February Feb
March Mar
April Apr
May May
June Jun
July Jul
August Aug
September Sep
October Oct
November Nov
December Dec

Abbreviated day and time: Tue Jun  7 18:06:20 1994
Numeric date: 06/07/94
Time: 18:06:20
12-hour time: 06:06:20 PM

The abbreviations used for before or after noon are "AM" and "PM" respectively.

Clause 6: Affirmative and negative answers

Yes expressions: strings starting with "Y" or "y" (= Yes)
No expressions: strings starting with "N" or "n" (= No)

End of Narrative Cultural Specification.

POSIX locale

# POSIX Standard Locale
# As per ISO/IEC 9945-2:1993 specifications
# except for these additional identifying comments
# Source: ISO/IEC JTC1/SC22 Secretariat
# Address: 8457 Rushing Creek Court
#         Springfield, VA 22153 U.S.A.
# Contact: William C. Rinehuls
# Email: rinehuls@radix.net
# Tel:  +1 703 912-9680
# Fax:  +1 703 912-2973
# Language: POSIX
# Territory: 
# Revision: 1.3
# Date: 1999-06-25
# Application: general
# Users: general
# Repertoiremap: POSIX
# Charset: ISO646:1993
# Distribution and use is free, also for
# commercial purposes.

# The following is the POSIX Locale LC_CTYPE.
# "alpha" is by default "upper" and "lower"
# "alnum" is by definiton "alpha" and "digit"
# "print" is by default "alnum", "punct" and the <space> character
# "graph" is by default "alnum" and "punct"
upper   <A>;<B>;<C>;<D>;<E>;<F>;<G>;<H>;<I>;<J>;<K>;<L>;<M>\
lower   <a>;<b>;<c>;<d>;<e>;<f>;<g>;<h>;<i>;<j>;<k>;<l>;<m>\
digit   <zero>;<one>;<two>;<three>;<four>;\
space   <tab>;<newline>;<vertical-tab>;<form-feed>;\
cntrl   <alert>;<backspace>;<tab>;<newline>;<vertical-tab>;\
punct   <exclamation-mark>;<quotation-mark>;<number-sign>;\
xdigit  <zero>;<one>;<two>;<three>;<four>;<five>;<six>;<seven>;<eight>;\
blank   <space>;<tab>
tolower (<A>,<a>);(<B>,<b>);(<C>,<c>);(<D>,<d>);(<E>,<e>);\
toupper (<a>,<A>);(<b>,<B>);(<c>,<C>);(<d>,<D>);(<e>,<E>);\

# This is the POSIX Locale definition for the LC_COLLATE category.
# The order is the same as in the ASCII code set.
order_start forward

# This is the POSIX Locale definition for
# the LC_MONETARY category.
int_curr_symbol     ""
currency_symbol     ""
mon_decimal_point   ""
mon_thousands_sep   ""
mon_grouping        -1
positive_sign       ""
negative_sign       ""
int_frac_digits     -1
frac_digits         -1
p_cs_precedes       -1
p_sep_by_space      -1
n_cs_precedes       -1
n_sep_by_space      -1
p_sign_posn         -1
n_sign_posn         -1

# This is the POSIX Locale definition for
# the LC_NUMERIC category.
decimal_point   "<period>"
thousands_sep   ""
grouping        -1

# This is the POSIX Locale definition for
# the LC_TIME category.
# Abbreviated weekday names (%s)
abday   "<S><u><n>";"<M><o><n>";"<T><u><e>";"<W><e><d>";\
# Full weekday names (%A)
day     "<S><u><n><d><a><y>";"<M><o><n><d><a><y>";\
# Abbreviated month names (%b)
abmon   "<J><a><n>";"<F><e><b>";"<M><a><r>";\
# Full month names (%B)
mon     "<J><a><n><u><a><r><y>";"<F><e><b><r><u><a><r><y>";\
# Equivalent of AM/PM (%p)      "AM"/"PM"
am_pm   "<A><M>";"<P><M>"
# Appropriate date and time representation (%c)
#       "%a %b %e %H:%M:%S %Y"
d_t_fmt "<percent-sign><a><space><percent-sign><b><space><percent-sign><e>\
# Appropriate date representation (%x)   "%m/%d/%y"
d_fmt   "<percent-sign><m><slash><percent-sign><d><slash><percent-sign><y>"
# Appropriate time representation (%X)   "%H:%M:%S"
t_fmt   "<percent-sign><H><colon><percent-sign><M><colon><percent-sign><S>"
# Appropriate 12 h time representation (%Xr   "%I:%M:%S %p"
t_fmt_ampm "<percent-sign><I><colon><percent-sign><M><colon><percent-sign><S><space><percent-sign><p>"

# This is the POSIX Locale definition for
# the LC_MESSAGES category.
yesexpr "<circumflex><left-square-bracket><y><Y><right-square-bracket>"
noexpr  "<circumflex><left-square-bracket><n><N><right-square-bracket>"