Tuesday, December 8, 2015

ASCII 255: "I Can't Believe It's not a Space!"

Character 255 has two uses of which I take advantage frequently. (As frequently as one can take advantage of nonstandard characters.) It looks just like a space, but has these special properties:

  1. It doesn't get eaten by applications that try to remove extra space. If you're trying to hand-align some text, you might need character 255 to stop your fancy diagram from getting crushed against the left margin.
  2. It prevents words around it from being broken across lines. If you have, say, a name that contains initials ("C. K. Williams", for instance), you might want a 255 between the initials and maybe also between the last initial and the written-out component.
You can insert a 255 by pressing 2, then 5, then 5 again on your numeric keypad while holding the right-hand Alt key. NumLock probably has to be on. The HTML entity is   - "non-breaking space."

No comments:

Post a Comment