GNU bug report logs - #47103
numfmt: invalid suffix 'k'

Previous Next

Package: coreutils;

Reported by: Daniel Callejas Sevilla <daniel.callejas.sevilla <at> gmail.com>

Date: Fri, 12 Mar 2021 16:18:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


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

From: Sven Köhler <sven.koehler <at> gmail.com>
To: 47103 <at> debbugs.gnu.org
Subject: numfmt: invalid suffix 'k'
Date: Sat, 25 Nov 2023 22:27:15 +0100
[Message part 1 (text/plain, inline)]
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 lowercase k.

I have to say, that uppercause K is quite common, but it is not correct 
as far as SI prefixes are concerned.

Also note that Ki in iec-i mode is quite correct. I'm torn about iec 
mode. I believe that people silently switch 1000 for 1024 and use the 
lower case k as well as uppercase K. Maybe numfmt should have an option 
to accept/produce both here as well?

Is there really a standard/specification that allows k/K for 1024? 
Wikipedia only lists Ki as IEC prefixes.
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 179 days ago.

Previous Next


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