documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Use consistent data size units

Open carlcsaposs opened this issue 3 years ago • 4 comments

Signed-off-by: Carl Csaposs [email protected]

carlcsaposs avatar Feb 07 '22 01:02 carlcsaposs

Should binary byte units be specified according to ISO/IEC 80000-13 (e.g. kibibyte, KiB)?

PHP uses "kilobyte" to represent 1024 bytes: https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes Nextcloud's front-end appears to do the same

ghost avatar Feb 07 '22 01:02 ghost

Should binary byte units be specified according to ISO/IEC 80000-13 (e.g. kibibyte, KiB)?

PHP uses "kilobyte" to represent 1024 bytes: https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes Nextcloud's front-end appears to do the same

@nickvergessen Here's a branch with ISO 80000-13 units: https://github.com/nextcloud/documentation/compare/master...carlcsaposs:units-iso

Should the documentation follow the ISO 80000-13 standard or the Nextcloud front-end and PHP standard?

Please let me know if you'd like me to push the changes on the carlcsaposs:units-iso branch to this PR.


Also, it appears that the comments in Nextcloud's source code use inconsistent units (see this example and this example).

I'd be happy to submit PRs to update the units across Nextcloud's repositories--please let me know if that would be useful.

ghost avatar Feb 24 '22 17:02 ghost

It's better to call things what they are. Advantage of the Si-units is that you have MiB and MB to make a difference.

Question now would be, if php considers "1M" to be 1 MiB, and now you want to set a quota, do we show that you need to select a value in MiB, or do we ask a value in MB and then do the internal conversion to MiB to apply the limit via php? And we have the clients as well. So this question goes a bit beyond just the documentation.

There was a long discussion before the fork about the use of SI units: https://github.com/owncloud/core/issues/13386

tflidd avatar Apr 21 '22 10:04 tflidd

@tflidd I appreciate you sharing the context of the owncloud issue--I didn't think to search owncloud repositories. Thank you!

ghost avatar Apr 30 '22 16:04 ghost