# Does U+007F contribute to a byte count?

U+007F, though it is not a C0 control character, Unicode still considers it as a control character. It is the deleted character.

If one mis-punched a character into a punched tape, one would turn it to the deleted character by punching all 7 holes. An interpreter for punched tapes would skip all deleted characters. ASCII followed this convention and thus assigned 0x7F the deleted character. And Unicode followed ASCII.

Following this convention, it would mean one must skip all U+007F. Does this mean U+007F doesn't contribute to a byte count at all?

• Is there a modern interpreter that interprets 0x7F as ignore this character? – Jo King Sep 1 at 6:09
• @JoKing I don't know. – Dannyu NDos Sep 1 at 6:36
• Then the premise one must skip all U+007F is false and therefore the answer to your last question is no. – Jo King Sep 1 at 7:50

# It counts as one byte in ASCII, UTF-8, and any language-specific SBCS

Regardless of how the character was treated in the history, 0x7F is a perfectly valid byte value to appear in a source code file. And when we score bytes, we are essentially counting the number of bytes in the source code file. Therefore, the character 0x7F should be counted as one byte like any other byte value.

Otherwise every single code-golf challenge would have Lenguage, 0 bytes.

• I think the only time this wouldn't apply is if there was some language where the deleted character was used for its actual purpose, and ignored. But then you'd just remove it before posting. – Redwolf Programs Sep 4 at 14:40