ByteSize icon indicating copy to clipboard operation
ByteSize copied to clipboard

[Cosmetic] "k" vs. "K": Wrong symbol for KiloByteSymbol constant in DecimalByteSize.cs

Open elgonzo opened this issue 5 years ago • 2 comments

The KiloByteSymbol in DecimalByteSize.cs (line 14) is incorrectly declared as "KB".

The uppercase "K", is considered an informal (non-standard) notation for 1024 bytes (=KiB). The correct unit prefix for 1000 is lowercase "k".

(By the way, one of the Wikipedia articles linked in the readme.md also points this out: https://en.wikipedia.org/wiki/Kilobyte#Definitions_and_usage ;-) )

elgonzo avatar Mar 04 '20 15:03 elgonzo

Informal usage is a thing. Displaying non-ambiguous facts is another.

I think the "B" should not be omitted and I would vote to change for:

public const string KiloByteSymbol = "kB";

Thoughts?

sandrock avatar Mar 25 '20 12:03 sandrock

@sandrock, my issue report is not about omitting the "B" (a unit). My issue report is regarding lowercase k vs. uppercase K (a unit prefix). And my recommendation is essentially the same as yours: using "kB" (lowercase k) for 1000 bytes :-)

elgonzo avatar Mar 27 '20 11:03 elgonzo