They are the most common code points for printed text, as well as newlines, spaces and carriage returns, and the like. ASCII is covered up to 0x7F, while standards such as Latin-1 or Windows Codepage 1251 use the remaining 128 bytes for accented characters, etc.
You expect text to use only these code points. Binary data will use all code points in the range 0x00-0xFF; for example, a text file will probably not use \ x00 (NUL) or \ x1F (Unit Separator in ASCII).
At best, it is a heuristic. Some text files may still try to use C0 control codes outside of these 7 characters, explicitly named, and I'm sure there are binary data that happens to not include 25 byte values not included in the textchars string.
The author of the range probably based it on the text_chars table from the file command. It marks bytes as non-text, ASCII, Latin-1, or non-ISO extended ASCII and includes documentation on why these code points are selected:
Interestingly, in this table there is no 0x7F that did not find the code you found.
Martijn Pieters Aug 24 '15 at 14:29 2015-08-24 14:29
source share