Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
On 04/07/2014 06:11 PM, PƔdraig Brady wrote:
>
> If we had to make it explicit for backwards compat reasons,
> then I suppose counting by characters is the least useful,
> so we could just standardize the existing ksh behavior and have:
>
> printf '%3s' 'blah' # count bytes
> printf '%3Ls' 'blah' # count cells
> LANG=C '%3Ls' 'blah' # count bytes
If we add %3Ls to the shell, we should also add it to libc's printf(3),
which means coordinating with the C committee.
>
> This has the disadvantage of not degrading gracefully
> on dash for example where %Ls is rejected.
If a future version of the standard mandates behavior for %Ls, I suspect
dash would be made compliant fairly quickly - the dash maintainers
strive hard to comply with POSIX.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc Description: OpenPGP digital signature