Chris Down wrote:
I don't have much of an opinion on whether this behaviour is right or
wrong in the context of bash, but if this behaviour is changed, I think
it should be done under another format character, rather than changing
%s (or changing behaviour when not in POSIX-compliance mode).
IM
Hello,
printf string format counts bytes instead of chars, which leads to broken
output ... just try this:
(/usr/bin/printf is broken too)
$ echo $LANG
us_US.UTF-8
$ printf "|%4s|\n" "aa"
| aa|
$ printf "|%4s|\n" "áá" (chars are a-acute)
|áá|
expected output:
| áá|
IMHO this is a big b