#1012312 coreutils: tr: confusing error message w.r.t. backwards c-c set points at nonconformant behaviour

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2022-06-03 18:45:04 UTC
Severity:
minor
#1012312#5
Date:
2022-06-03 18:41:43 UTC
From:
To:
Dear Maintainer,

  LC_ALL=POSIX tr '\049-!' '0'
fails with
  tr: range-endpoints of '9-!' are in reverse collating sequence order
but POSIX.1-2008/2018 says
  If either or both of the range endpoints are octal sequences of the
  form \octal, this shall represent the range of specific coded values
  between the two range endpoints, inclusive.
so if coreutils is /actually/ trying to generate a
locale-dependent collating sequence: that's invalid
(well, in the POSIX locale; it's unspecified in others)
if it isn't: the error message is wrong.

Similarly: the error is confusing enough as-is even when it's right
(note how it presents the decoded sequence,
 and very helpfully describes it as
 "range-endpoints in reverse collating sequence order",
 which probably means something to someone,
 but it's an insane way of writing '\049 < !').

Best,
наб