`expr length xxx` retruns the number of multibyte characters in RHEL8 and later.
Issue
- The output of
expr length xxx
differs between RHEL 6 and RHEL 8 when multibyte characters are specified.
It returns the number of bytes in RHEL 6:
# expr length "あいうえおABCDE"
20
It returns the number of multibyte characters in RHEL 8:
# expr length "あいうえおABCDE"
10
Environment
- Red Hat Enterprise Linux 8 or later
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.