WG15 Defect Report Ref: 9945-2-145
Topic: None specified


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-145

 _____________________________________________________________________________

	Topic : 		locale -k
	Relevant Sections: 	4.34.3, 4.34.6.1

Defect Report:
-----------------------

	From: ajosey@xopen.org (Andrew Josey)
	Date: Mon Mar 11 13:50:11 GMT 1996

The specification of locale -k seems unclear.

On page 316 of POSIX.2 line 5453, the -k option is defined as:

  -k	Write the names and values of selected keywords.  ...

where it is clearly defined what keywords are acceptable.  However,
it is NOT defined in the specification as to what form the values for
those keywords should take.  The only other mention is on page 318, where
it describes the format the output for the locale -k option is to take, but
also fails to describe where the value comes from.

The definitions on page 60 (Table 2-9)
indicates two possible values for the specified symbols, the localeconv() value
and the localedef value.  We can find no indication in the POSIX.2 specification
defining which of these values or other possible implementation defined
values are valid for the -k option for locale.

The most that the specification says about this is in Section 2.5.1:

 "....  The behaviour of standard utilities and functions in the POSIX 
 locale is as if the locale was defined via the localedef utility 
 with input data from Table... , all in 2.5.2"

However, the specification for the localedef utility does not define the
format or content of the output.  It DOES talk about the input as specified
in Section 2.5.2 , but not the output.  (Example: acceptable values
output from localedef of the localeconv() value is not denied by the
specification).

Further, the specification does not document nor does it discuss that a
translation from localedef to locale should or should not happen. (e.g.
the specification does not mandate that what goes into localedef, has to
come out of locale).

In particular, It appears as if locale may not necessarily  report the same
as what was input to localedef due to type changes (signed vs unsigned char).

We believe that the failure of the specification to clearly define what
values are acceptable to be returned to locale -k constitutes a grey area
in the specification and as such no conformance distinction can be made
based upon it.


Interpretation response
------------------------
We agree with the last paragraph of the interpretation request.  The
standard does not speak to this issue, and as such no conformance
distinction can be made between alternative implementations based on this.

Rationale
-------------
None.
Forwarded to Interpretations group: Mar 11 1996
Forwarded for review: May 21 1996
Finalised: Jul 9 1996