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

From: Hans Åberg via Unicode <unicode_at_unicode.org>
Date: Fri, 21 Feb 2020 18:05:21 +0100

> 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
Received on Fri Feb 21 2020 - 11:05:54 CST

This archive was generated by hypermail 2.2.0 : Fri Feb 21 2020 - 11:05:54 CST