[wp-trac] [WordPress Trac] #31350: size_format() Displaying Incorrect Unit

WordPress Trac noreply at wordpress.org
Mon Feb 16 19:32:11 UTC 2015


#31350: size_format() Displaying Incorrect Unit
--------------------------+-----------------------------
 Reporter:  brashell      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The `size_format()` function is using binary standards for displaying a
 human readable version of the file size, shouldn’t we use the IEC standard
 of KiB, MiB etc for the unit, or convert to SI and use 1000 instead of
 1024 as the value of bytes in a kB etc (ref:
 http://en.wikipedia.org/wiki/Kilobyte)? It was even noted that it was
 technically incorrect in the comments of the function:
 https://core.trac.wordpress.org/browser/tags/4.1/src/wp-
 includes/functions.php#L194 (If we do fix it, we need to take into
 consideration the whitespace in front of the 'B ' fixed in: #31052)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31350>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list