Subject: bug#17196: UTF-8 printf string formating problem

From: Jan Novak <[email-masked]>
Date: Sun, 06 Apr 2014 01:17:19 +0200

Hello,

printf string format counts bytes instead of chars, which leads to broken output ...
(the same problem occurs with bash built in printf)

just try this:

$ echo $LANG
us_US.UTF-8

$ printf "|%3s|\n" "a"
|  a|

$ printf "|%3s|\n" "á"     (char is a-acute)
| á|

expected output:
|  á|

Is there some easy solution ?

TIA for the answer

Best regards
Novak