I’ve noticed some files I opened in a text editor have all kinds of crazy unrenderable chars

  • AbouBenAdhem@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    Most binary-to-text encodings don’t attempt to make the text human-readable—they’re just intended to transmit the data over a text-only medium to a recipient who will decode it back to the original binary format.

    • cheese_greater@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 months ago

      I do understand I’m not able to read it myself, I’m more curious about the architecture of how that data is represented and stored and conceptually how such representation is practically organized/reified…

      • AbouBenAdhem@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 months ago

        The original binary format is split into six-bit chunks (e.g., 100101), which in decimal format correspond to the integers from 0 to 63. These are just mapped to letters in order:

        1. 000000 = A,
        2. 000001 = B,
        3. 000010 = C,
        4. 000011 = D,

        etc.—it goes through the capital letters first, then lower-case letters, then digits, then “+” and “/”. It’s so simple you could do it by hand from the above description, if you were looking at the data in binary format.