I often use printf inside shell scripts to make some nice aligned outputs
The problem is, everytime there is an accent (éèà) in the printed string, it shifts the following string 1 step back.
Example :
printf "%-10s %s\n" "toto" "test"
printf "%-10s %s\n" "titi" "test"
printf "%-10s %s\n" "tété" "test"
printf "%-10s %s\n" "toto" "test"
Expected :
toto test
titi test
tété test
toto test
Got :
toto test
titi test
tété test
toto test
Does someone have an explanation on this and what can I do to make printf doing it right with special characters?
Thank you for your help