The following issue has been SUBMITTED. ====================================================================== https://austingroupbugs.net/view.php?id=1741 ====================================================================== Reported By: ajosey Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1741 Category: System Interfaces Type: Error Severity: Objection Priority: normal Status: New Name: Andrew Josey Organization: User Reference: ISO/US-003 Section: 3 Page Number: na Line Number: na Final Accepted Text: ====================================================================== Date Submitted: 2023-05-31 17:13 UTC Last Modified: 2023-05-31 17:13 UTC ====================================================================== Summary: getlocalename_l (ISO/US-003) Description: In Volume 2, Chapter 3, the Description for getlocalename_l specifies that using LC_ALL as the category argument for a call shall result in the call being not successful. This restriction in functionality leaves application developers without a portable way to record, into a string usable with setlocale (with LC_ALL), the “name” of the locale represented by the locale object. In particular, “composite” or “mixed” locales using a different locale definition for at least one category have such “names” formed by the implementation, but the format is not uniform across implementations.
The C++ standard library presents a std::locale type with interfaces that can produce such mixed locales in a thread-safe manner. It also includes a std::locale::global function that requires setlocale interaction with such a mixed std::locale. C++ standard library implementations currently suffer in terms of quality or portability from a lack of a C-level, standardized, thread-safe locale interface that will produce a “name” for such mixed locales. As POSIX provides thread-safe locales as an extension to C, the missing functionality seems to be within the scope of POSIX to provide. Desired Action: Remove the specification that using LC_ALL results in a call being not successful. Specify that using LC_ALL results in “a string which encodes the locale name(s) for all of the individual categories, consistent with setlocale”. Specify that using LC_ALL for the category returns a string that may be invalidated or overwritten by a subsequent call in the same thread with LC_ALL. Update the rationale; an example use case for LC_ALL is application portability in recording the “international environment” even in the face of extensions such as the introduction of extra categories such as LC_TELEPHONE. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2023-05-31 17:13 ajosey New Issue 2023-05-31 17:13 ajosey File Added: ISO_IEC CD 9945 Collated Comments.doc 2023-05-31 17:13 ajosey Name => Andrew Josey 2023-05-31 17:13 ajosey User Reference => ISO/US-003 2023-05-31 17:13 ajosey Section => 3 2023-05-31 17:13 ajosey Page Number => na 2023-05-31 17:13 ajosey Line Number => na ======================================================================
