Binary files

What's the difference between regular files and binary files?
Text files are files that contain only printable characters and whitespace (spaces, tabs and line breaks).

Traditionally, the word "binary files" are used when talking about files that are not text files, but all files are really "binary files".

When opening a file in binary mode, bytes from the file are read directly. When opening as a text file, on some operating systems (e.g. MS Windows) some characters may be converted automatically by the read/write functions. In particular, \n may be converted to \r\n.

The term "regular files" is not well defined, but may be referring to text files.
Yes, by "regular files", I meant text files.
Topic archived. No new replies allowed.