IEEE Standards Interpretations for IEEE Std 1003.2™-1992 IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX®)--Part 2: Shell and Utilities
Copyright © 1996 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department, Copyrights and Permissions, 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Interpretation Request #70
Topic: message format of POSIX.2 utilities in C locale Relevant Clauses: various
IEEE Std 1003.2-1992 states particular message formats for utility output on standard output and standard error for the POSIX locale. This matter is of particular interest since it will effect how this section of POSIX.2 is tested. An example follows; subclause 22.214.171.124 utility cmp states “... the following diagnostic message shall be written in the POSIX Locale,... ”cmp: EOF on %s%s\n“, <name of shorter file>, <additional info>”
This would seem to preclude implementations that Choose their default POSIX locale to be that other than American English and/or Choose to use an enhanced error message format that gives additional information including the above message; for example: UX:cmp: INFO: EOF on example1.txt
Are implementations that take approaches (a) and/or (b) conformant? I'd like to propose that they are. This ruling would also apply to other similar wording within POSIX.2.
Interpretation for Response
The POSIX locale requires particular message formats for some of the standard utilities. When those standard utilities are invoked in an environment in which the LC_MESSAGES category is “C” or “POSIX”, the required messages for the POSIX locale must be used. Therefore, implementations that take approach (a) or (b), where the messages are not formatted as required for the POSIX locale, are not conformant. When the invocation environment for the LC_MESSAGES category is other than the POSIX locale, and in particular, when none of the LANG, LC_ALL, or LC_MESSAGES environment variables is set to a valid locale name, implementations may choose to use a default error message format that gives additional (or otherwise differently formatted) information. Therefore, implementations that take approach (b) under those circumstances could be conformant. The standard clearly states the behaviour for message formats and conforming implementations must conform to this.
Rationale for Interpretation