GNU bug report logs - #17196
multibyte: printf: %s counts bytes instead of characters

Previous Next

Package: coreutils;

Reported by: Jan Novak <jn <at> turbo.sk>

Date: Sat, 5 Apr 2014 23:22:01 UTC

Severity: wishlist

Full log


Message #20 received at 17196 <at> debbugs.gnu.org (full text, mbox):

From: Jan Novak <jn <at> turbo.sk>
To: Pádraig Brady <P <at> draigBrady.com>, 
 Bob Proulx <bob <at> proulx.com>
Cc: 17196 <at> debbugs.gnu.org
Subject: Re: bug#17196: UTF-8 printf string formating  problem
Date: Mon, 07 Apr 2014 23:41:03 +0200
Pádraig Brady wrote:
> Pity there is no consensus here.
> Personally I would go for:
>    printf '%3s' 'blah'  # count cells
>    printf '%3Ls' 'blah' # count chars
>    LANG=C '%3Ls' 'blah' # count bytes
>    LANG=C '%3s' 'blah'  # count bytes

I vote for it ...
it is excellent idea, that "standard" notation works properly in localized environment !
(because this is exactly what users expect)

Thanks !
novak




This bug report was last modified 6 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.