• Zagorath@aussie.zone
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    (e.g. $27 000)

    Ok so they’re winning $27, but I thought it was filmed in America, not Australia. Shouldn’t that be $27 911?

    /s, obviously.

    But more seriously, yeah a space is brilliant. But you shouldn’t use U+0020, the space you get when you press spacebar. It’s awkwardly wide for this purpose, and more importantly it can break the number over two lines if it happens to line up that way.

    The best alternative is U+202F, which is both narrower and non-breaking. Wikipedia claims that the official SI recommended character for thousands separation is U+2009, the thin but breaking space, but I read their source and did not see this supported. It seemed to just say space, without specifying which type of space. There is of course also U+00A0, the no-break normal-width space. Any of these would be better than U+0020.

    The problem is them being difficult to type, which is probably why most people tend towards the comma instead. It’s automatically non-breaking and doesn’t have the awkward wideness of U+0020.

    Incidentally, SI specifically allows for either the comma or the point to be used as the decimal separator. As long as the thousands separator is a space, this can introduce no ambiguity.

      • Zagorath@aussie.zone
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 months ago

        Why not?

        I didn’t have the specific Unicode codes memorised. Those I found on Wikipedia. But the knowledge that there exist spaces of different sizes and the non-breaking space just comes out of my general interest in computers across the board.

        • FiveMacs@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          I assumed you had it all memorized like some kind of warez ASCII NFO creator.

          I only have alt-255 whitespace memorized from my ultima7 cheating days

          • Zagorath@aussie.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            3 months ago

            I have a few alt codes memorised, but not very many. 0151 and 0150 are — and – (em and en dash) respectively 8230 is ellipsis, except for some reason that doesn’t work in all applications, including web browsers.

            255 is apparently the non-breaking space, so same as U+00A0 mentioned above. It can also be written in some websites (including here) with  . Like this.

    • warm@kbin.earth
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      3 months ago

      Yeah, but aint nobody got time for that. Just hit the spacebar.