RE: Why do binary files contain text but text files don't contain binary?

From: Doug Ewell via Unicode <unicode_at_unicode.org>
Date: Fri, 21 Feb 2020 09:59:18 -0700
Costello, Roger L. wrote:
 
> Text files may indeed contain binary (i.e., bytes that are not
> interpretable as characters). Namely, text files may contain newlines,
> tabs, and some other invisible things.
>
> Question: "characters" are defined as only the visible things, right?
 
In addition to this being incorrect, as Ken and Richard (so far) have pointed out, this isn't the distinction you are looking for.
 
All file formats contain data which is relevant to that file format. Zip files, executables, JPEGs, MP4s, all contain specific data structured in a specific way. If any of them has that structure interrupted by random bytes, the format has been broken and the file is corrupt.
 
It is no different for text data, which is expected to contain certain bytes and is normally not expected to be interrupted by a series of ranëH‰UÀHƒÈÿH
 
Does that help?
 
--
Doug Ewell | Thornton, CO, US | ewellic.org
 
Received on Fri Feb 21 2020 - 11:00:17 CST

This archive was generated by hypermail 2.2.0 : Fri Feb 21 2020 - 11:00:19 CST