Bug 13726 - CONFIG_FEATURE_TR_CLASSES should support POSIX character classes
Summary: CONFIG_FEATURE_TR_CLASSES should support POSIX character classes
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-06 22:19 UTC by opal hart
Modified: 2021-04-06 22:20 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.