Package: bash Version: 4.4-5 Package: coreutils Version: 8.25-2
The printf command in bash (builtin) and corutils /usb/bin/printf have an error in counting the length of a string, if a non-ascii character is involved. Example is the arrow - type Alt+I. Try the following commands: printf -v r "%-2s X\n" '→' ; echo ${#r} # prints 4 printf -v r "%-2s X\n" ' ' ; echo ${#r} # prints 5 The coreutils version of printf has the same misbehaviour.