bug#47103: numfmt: invalid suffix 'k'

2023-11-26 Thread Glenn Golden
Sven Köhler [2023-11-26 17:09:23 +0100]: > So Pádraig's patch does allow for parsing lowercase k, but it does not > change numfmt to use lowercase k in its output in si mode. > > As Pádraig has shown, ls uses lowercase k in --si mode. So it uses lowercase > k for 1000. I think that numfmt should

bug#47103: numfmt: invalid suffix 'k'

2023-11-26 Thread Pádraig Brady
On 26/11/2023 16:09, Sven Köhler wrote: So Pádraig's patch does allow for parsing lowercase k, but it does not change numfmt to use lowercase k in its output in si mode. As Pádraig has shown, ls uses lowercase k in --si mode. So it uses lowercase k for 1000. I think that numfmt should behave

bug#47103: numfmt: invalid suffix 'k'

2023-11-26 Thread Sven Köhler
So Pádraig's patch does allow for parsing lowercase k, but it does not change numfmt to use lowercase k in its output in si mode. As Pádraig has shown, ls uses lowercase k in --si mode. So it uses lowercase k for 1000. I think that numfmt should behave the same for consistency reasons.

bug#47103: numfmt: invalid suffix 'k'

2023-11-26 Thread Pádraig Brady
On 25/11/2023 21:27, Sven Köhler wrote: Not only --from=si is broken. Also --to=si is broken: $ numfmt --to=si 3000 3,0K In order to not break backwards compatibility, you probably have to introduce a switch --lowercase-kilo such that --to=si produces proper SI compliant output. Then have

bug#47103: numfmt: invalid suffix 'k'

2023-11-25 Thread Sven Köhler
Not only --from=si is broken. Also --to=si is broken: $ numfmt --to=si 3000 3,0K In order to not break backwards compatibility, you probably have to introduce a switch --lowercase-kilo such that --to=si produces proper SI compliant output. Then have --from=si accept both uppercase and

bug#47103: numfmt: invalid suffix 'k'

2021-03-12 Thread Daniel Callejas Sevilla
Hello, the SI prefix for 'a thousand' is a lowercase k and not an uppercase K [1]. The default behavior of numfmt with '--from=si' option is therefore contrary to expectation: $ numfmt --from=si 500k# Should be accepted as valid SI numfmt: invalid suffix in input: ‘500k’ $ numfmt