View Issue Details

IDProjectCategoryView StatusLast Update
00002941003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
Reportergeoffclare Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionstrcasecmp(), wcscasecmp()
Page Number1985, 2197
Line Number62817, 69221
Interp Status---
Final Accepted Text
Summary0000294: Errors in "POSIX locale" statements on strcasecmp() and wcscasecmp() pages
DescriptionThe strcasecmp() page contains this statement:

    When the LC_CTYPE category of the current locale is from the POSIX
    locale, strcasecmp() and strncasecmp() shall behave as if the
    strings had been converted to lowercase and then a byte comparison
    performed. Otherwise, the results are unspecified.

The corresponding statement on the wcscasecmp() page is:

    When the LC_CTIME category of the current locale is from the POSIX
    locale, these functions shall behave as if the strings had been
    converted to lowercase and then a byte comparison performed.
    Otherwise, the results are unspecified.

There are several problems here.

1. The statement on the strcasecmp() page should cover all of the functions
described on that page.

2. The statement on the wcscasecmp() page should say LC_CTYPE not LC_CTIME.

3. Both should not say "current locale" in connection with the _l()
functions.

4. The statement on the wcscasecmp() page says "byte comparison" but
should refer to comparison of wide-character codes (or wchar_t values,
but the wcscmp() page refers to wide-character codes).
Desired ActionOn the strcasecmp() page change

    When the LC_CTYPE category of the current locale is from the POSIX
    locale, strcasecmp() and strncasecmp() shall

to

    When the LC_CTYPE category of the locale being used is from the
    POSIX locale, these functions shall

On the wcscasecmp() page change

    When the LC_CTIME category of the current locale is from the POSIX
    locale, these functions shall behave as if the strings had been
    converted to lowercase and then a byte comparison performed.
    Otherwise, the results are unspecified.

    The information for wcscasecmp_l() and wcsncasecmp_l() about the
    case of the characters comes from the locale represented by locale.

to

    The wcscasecmp() and wcsncasecmp() functions use the current locale
    to determine the case of the wide characters.

    The wcscasecmp_l() and wcsncasecmp_l() functions use the locale
    represented by locale to determine the case of the wide characters.

    When the LC_CTYPE category of the locale being used is from the
    POSIX locale, these functions shall behave as if the wide-character
    strings had been converted to lowercase and then a comparison of
    wide-character codes performed. Otherwise, the results are
    unspecified.
Tagstc1-2008

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-07-23 15:40 geoffclare New Issue
2010-07-23 15:40 geoffclare Status New => Under Review
2010-07-23 15:40 geoffclare Assigned To => ajosey
2010-07-23 15:40 geoffclare Name => Geoff Clare
2010-07-23 15:40 geoffclare Organization => The Open Group
2010-07-23 15:40 geoffclare Section => strcasecmp(), wcscasecmp()
2010-07-23 15:40 geoffclare Page Number => 1985, 2197
2010-07-23 15:40 geoffclare Line Number => 62817, 69221
2010-07-23 15:40 geoffclare Interp Status => ---
2010-07-29 16:12 Don Cragun Status Under Review => Resolved
2010-07-29 16:12 Don Cragun Resolution Open => Accepted
2010-08-27 11:15 ajosey Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Resolved => Closed