Re: UTF-8 printf string formating problem

2014-04-06 Thread Jan Novak
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

UTF-8 printf string formating problem

2014-04-05 Thread Jan Novak
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