|
From: | Jan Novak |
Subject: | bug#17196: UTF-8 printf string formating problem |
Date: | Sun, 06 Apr 2014 01:17:19 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |