Why do binary files contain text but text files don't contain binary?
Hans Åberg via Unicode
unicode at unicode.org
Fri Feb 21 11:05:21 CST 2020
> On 21 Feb 2020, at 13:21, Costello, Roger L. via Unicode <unicode at unicode.org> wrote:
>
> There are binary files and there are text files.
In C, when opening a file as binary with the function fopen, the newlines are untranslated [1]. If not using this option, the file is informally text, which means that internally in the program, one can assume that the newline [2] is the character U+000A LINE FEED (LF).
1. https://en.cppreference.com/w/cpp/io/c/fopen
2. https://en.wikipedia.org/wiki/Newline
More information about the Unicode
mailing list