[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UTF-8 printf string formating problem

From: Jan Novak
Subject: UTF-8 printf string formating problem
Date: Sun, 06 Apr 2014 01:43:43 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

printf string format counts bytes instead of chars, which leads to broken 
output ... just try this:
(/usr/bin/printf is broken too)

$ echo $LANG

$ printf "|%4s|\n" "aa"
|  aa|

$ printf "|%4s|\n" "áá"     (chars are a-acute)

expected output:
|  áá|

IMHO this is a big bug, because it breaks any non ASCII chars formating.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]