| Summary: | localeconv() grouping appears not to match POSIX | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Ed Maste <emaste> | ||||
| Component: | standards | Assignee: | Ed Maste <emaste> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | theraven, yuripv | ||||
| Priority: | Normal | Keywords: | patch | ||||
| Version: | 9.0-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Ed Maste
2012-10-01 16:50:02 UTC
This looks correct, and may account for a couple of the libc++ test failures. I'm not sure what the ports fallout for the fix would be though. The -1, "" case seems more sensible because it means that callers don't need to special case the no-grouping case (-1, "" means treat all remaining characters as having no grouping) batch change of PRs untouched in 2018 marked "in progress" back to open. I stumbled upon this issue while looking into locale(1) reporting incorrect values (i.e. 127 instead of -1 for a lot of keywords), and indeed localeconv() returns not what one would expect reading https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html. For the locale(1), I'll just check for 127, but for the ports, I doubt the fallout from fixing this could ever be tested by exp-run as a lot of projects could just #ifdef us and expect "\177", those would still compile, but misbehave. Any progress on this one? we imho need this patch to be committed A commit references this bug: Author: emaste Date: Thu Dec 19 17:01:26 UTC 2019 New revision: 355914 URL: https://svnweb.freebsd.org/changeset/base/355914 Log: localeconv: correct grouping and mon_grouping per C/POSIX grouping and mon_grouping should be "" in the C locale. PR: 172215 MFC after: 6 weeks Sponsored by: The FreeBSD Foundation Changes: head/lib/libc/locale/fix_grouping.c A commit references this bug: Author: emaste Date: Sun Mar 8 18:09:41 UTC 2020 New revision: 358751 URL: https://svnweb.freebsd.org/changeset/base/358751 Log: MFC r355914: localeconv: correct grouping and mon_grouping per C/POSIX grouping and mon_grouping should be "" in the C locale. PR: 172215 Sponsored by: The FreeBSD Foundation Changes: _U stable/12/ stable/12/lib/libc/locale/fix_grouping.c |