[PATCH] Add support for JEDEC/metric standards to KLocale::formatByteSize

Parker Coates parker.coates at gmail.com
Wed Jul 15 13:49:41 BST 2009


On Wed, Jul 15, 2009 at 2:42 AM, Thiago Macieira wrote:
> Michael Pyne wrote:
>>Question on formatByteRate: Typically anything involving bits is given
>> in decimal, so I intend to continuing that convention.  Byte rates are
>> typically given in decimal as well from what I understand, but given
>> the feedback I've had I take it that would be a bad idea to show e.g.
>> "kB/s" for a user running default IEC units, and so therefore we'd
>> prefer "KiB/s"?
>
> bits are specified in decimal units everywhere (rates and amounts), whereas
> bytes are specified in binary units everywhere.
>
> Rates and amounts should not differ, except for the "/s" at the end.

Exactly. To do this properly, both a formatByteRate method and a
formatBitRate method are needed. Format byte rate should use the same
prefixes as formatByteSize. formatBitRate should always use decimal
prefixes.

Parker




More information about the kde-core-devel mailing list