Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Displayed download size / decimal separator

Displayed download size / decimal separator

Scheduled Pinned Locked Moved The Lounge
tutorial
11 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Andre xxxxxxx

    It seems that for newly submitted articles the download size also shows the fractional part, for example "48,552 KB", which is especially confusing because the decimal separator is localized. I expected 48 MB, but the file size is only 48552 bytes. I think the best idea would be to remove the fractional part.

    C Offline
    C Offline
    Chris Maunder
    wrote on last edited by
    #2

    Actually the decimal separator isn't localised. We forgot to do a divide-by-1024 :-O. The problem has since been fixed (for new articles). We hope that authors of new articles will pick up on the problem next time they edit their article

    cheers, Chris Maunder

    CodeProject.com : C++ MVP

    1 Reply Last reply
    0
    • A Andre xxxxxxx

      It seems that for newly submitted articles the download size also shows the fractional part, for example "48,552 KB", which is especially confusing because the decimal separator is localized. I expected 48 MB, but the file size is only 48552 bytes. I think the best idea would be to remove the fractional part.

      R Offline
      R Offline
      Ri Qen Sin
      wrote on last edited by
      #3

      Technically, it's correct for 1 KB to be 1000 bytes. The unit for 1024 bytes has been officially KiB (kibibyte) for a while now.

      ROFLOLMFAO

      A G A P 4 Replies Last reply
      0
      • R Ri Qen Sin

        Technically, it's correct for 1 KB to be 1000 bytes. The unit for 1024 bytes has been officially KiB (kibibyte) for a while now.

        ROFLOLMFAO

        A Offline
        A Offline
        Andre xxxxxxx
        wrote on last edited by
        #4

        Ri Qen-Sin wrote:

        Technically, it's correct for 1 KB to be 1000 bytes.

        Except that the SI unit is kB and not KB ;)

        P 1 Reply Last reply
        0
        • R Ri Qen Sin

          Technically, it's correct for 1 KB to be 1000 bytes. The unit for 1024 bytes has been officially KiB (kibibyte) for a while now.

          ROFLOLMFAO

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #5

          Ri Qen-Sin wrote:

          The unit for 1024 bytes has been officially KiB (kibibyte) for a while now

          Uh-huh. :rolleyes:

          Software Zen: delete this;

          Fold With Us![^]

          1 Reply Last reply
          0
          • A Andre xxxxxxx

            Ri Qen-Sin wrote:

            Technically, it's correct for 1 KB to be 1000 bytes.

            Except that the SI unit is kB and not KB ;)

            P Offline
            P Offline
            peterchen
            wrote on last edited by
            #6

            Absolutely - introducing a new unit prefix so HDD makes can continue to cheat - ridiculous! (nitpickers corner: I know that it doesn't wprk fo MB/GB)

            We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
            My first real C# project | Linkify!|[">FoldWithUs!](http://tinyurl.com/37q6tt<br mode=) | sighist

            1 Reply Last reply
            0
            • R Ri Qen Sin

              Technically, it's correct for 1 KB to be 1000 bytes. The unit for 1024 bytes has been officially KiB (kibibyte) for a while now.

              ROFLOLMFAO

              A Offline
              A Offline
              Anthony Mushrow
              wrote on last edited by
              #7

              Ri Qen-Sin wrote:

              Technically, it's correct for 1 KB to be 1000 bytes.

              WHAT? That must be for none savvy people for sure... But on a computer, if a file is 200KB, its still 204,800 bytes, right? And there's still 8 bits in a byte? And a nibble is still the really bad joke of a computer nerd?

              My current favourite word is: Bauble!

              -SK Genius

              L P J 3 Replies Last reply
              0
              • R Ri Qen Sin

                Technically, it's correct for 1 KB to be 1000 bytes. The unit for 1024 bytes has been officially KiB (kibibyte) for a while now.

                ROFLOLMFAO

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #8

                Ri Qen-Sin wrote:

                The unit for 1024 bytes has been officially KiB (kibibyte) for a while now

                Actually, the official term here is the quibblebyte. That's the unit of measurement for people who correct others.

                Deja View - the feeling that you've seen this post before.

                My blog | My articles

                1 Reply Last reply
                0
                • A Anthony Mushrow

                  Ri Qen-Sin wrote:

                  Technically, it's correct for 1 KB to be 1000 bytes.

                  WHAT? That must be for none savvy people for sure... But on a computer, if a file is 200KB, its still 204,800 bytes, right? And there's still 8 bits in a byte? And a nibble is still the really bad joke of a computer nerd?

                  My current favourite word is: Bauble!

                  -SK Genius

                  L Offline
                  L Offline
                  Luc Pattyn
                  wrote on last edited by
                  #9

                  SK Genius wrote:

                  And there's still 8 bits in a byte?

                  That is very narrow-minded. There has been (still is?) a Data General system with a word size of 36 bits, capable of holding five 7-bit bytes and 1 flag bit; and a Honeywell system with 9-bit bytes. K&R allow for different byte sizes in their C definition. Some of the modern languages (Java, C#) insist on 8-bit bytes. Finally http://en.wikipedia.org/wiki/Byte[^] is tolerant: "In computer science a byte (pronounced "bite") is a unit of measurement of information storage, most often consisting of eight bits" BTW: I consistently use K for 1024 and k for 1000, hence KB and km; and M for K*K as well as k*k! :)

                  Luc Pattyn [Forum Guidelines] [My Articles]


                  Sorry for any delays in replying, I currently don't always get e-mail notifications.


                  1 Reply Last reply
                  0
                  • A Anthony Mushrow

                    Ri Qen-Sin wrote:

                    Technically, it's correct for 1 KB to be 1000 bytes.

                    WHAT? That must be for none savvy people for sure... But on a computer, if a file is 200KB, its still 204,800 bytes, right? And there's still 8 bits in a byte? And a nibble is still the really bad joke of a computer nerd?

                    My current favourite word is: Bauble!

                    -SK Genius

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #10

                    SK Genius wrote:

                    a nibble is still the really bad joke of a computer nerd

                    It's a nybble. ;P

                    Deja View - the feeling that you've seen this post before.

                    My blog | My articles

                    1 Reply Last reply
                    0
                    • A Anthony Mushrow

                      Ri Qen-Sin wrote:

                      Technically, it's correct for 1 KB to be 1000 bytes.

                      WHAT? That must be for none savvy people for sure... But on a computer, if a file is 200KB, its still 204,800 bytes, right? And there's still 8 bits in a byte? And a nibble is still the really bad joke of a computer nerd?

                      My current favourite word is: Bauble!

                      -SK Genius

                      J Offline
                      J Offline
                      Jorgen Sigvardsson
                      wrote on last edited by
                      #11

                      SK Genius wrote:

                      And a nibble is still the really bad joke of a computer nerd?

                      It's 4 bits, always been, and always will be. It ain't no joke man! ;P

                      -- Kein Mitleid Für Die Mehrheit

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups