Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elgonzo opened this issue Mar 4, 2020 · 2 comments

Comments

@elgonzo
Copy link

elgonzo commented Mar 4, 2020

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 elgonzo changed the title "k" vs. "K": Wrong symbol for KiloByteSymbol constant in DecimalByteSize.cs [Cosmetic bug] "k" vs. "K": Wrong symbol for KiloByteSymbol constant in DecimalByteSize.cs Mar 4, 2020
@elgonzo elgonzo changed the title [Cosmetic bug] "k" vs. "K": Wrong symbol for KiloByteSymbol constant in DecimalByteSize.cs [Cosmetic] "k" vs. "K": Wrong symbol for KiloByteSymbol constant in DecimalByteSize.cs Mar 4, 2020
@sandrock
Copy link

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?

@elgonzo
Copy link
Author

elgonzo commented Mar 27, 2020

@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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants