Bug 13726

Summary: CONFIG_FEATURE_TR_CLASSES should support POSIX character classes
Product: Busybox Reporter: opal hart <opal>
Component: Standard ComplianceAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs, opal
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

Description opal hart 2021-04-06 22:19:20 UTC
For the `tr` utility, currently only [:upper:] and [:lower:] character classes are supported with CONFIG_FEATURE_TR_CLASSES. POSIX defines support for additional character classes; from tr(1p):

[:class:] Represents  all characters belonging to the defined character
          class, as defined by the current setting of the LC_CTYPE  lo‐
          cale  category.  The following character class names shall be
          accepted when specified in string1:

          alnum   blank   digit   lower   punct   upper
          alpha   cntrl   graph   print   space   xdigit

I haven't looked too in-depth into the code around this, so I don't know how feasible it would be to add some or all of the additional classes.