C" locale collating behaviour not definedThis issue has been automatically converted from the original issue lists and some formatting may not have been preserved.
Authors: AFNOR (Antoine Leca)
Date: 2000-10-18
Submitted against: C99
Status: Closed
Converted from: summary-c99.htm, dr_235.htm
Usually, the locale-specific behaviour for the library functions is specified when it comes to the "
C" locale. A noteworthy and well-known exception to that the set of printing characters is not restricted. However, other points that may be seen as overviews. In 7.21.4.3 (strcoll), 7.24.4.4.2 (wcscoll), 7.21.4.5 (strxfrm) and 7.24.4.4.4 (wcsxfrm), no behaviour is specified in the case of the "C" locale.It is customary to default to respectively
strcmpforstrcoll,wcscmpforwcscoll, and the identity function for the latter two, but this is not presently required.
Suggested responses
There are basically two choices:
- left things as they are, since use of
strcolland alii in the "C" locale is not expected to be a noteworthy situation- correct the Standard along the customary way
In 7.21.4.3, add a new sentence (or a new paragraph) under Description which says:
In the "
C" locale, this function operates in the same way asstrcmpdoes.In 7.24.4.4.2, add a new sentence in paragraph 2 (or a new paragraph) which says:
In the "
C" locale, this function operates in the same way aswcscmpdoes.In 7.21.4.5, add a new sentence in paragraph 2 (or a new paragraph) which says:
In the "
C" locale, this function copies at mostncharacters from the string pointed bys2tos1.In 7.24.4.4.4, add a new sentence in paragraph 2 (or a new paragraph) which says:
In the "
C" locale, this function copies at mostnwide characters from the string pointed bys2tos1.
Comment from WG14 on 2002-03-03:
The committee decided to make no change. The standard does not require that
strcoll() and strcmp() perform the same in the C locale.