This is due to how you interpret what is in the file. Everything in the file is binary, the integer character, etc.
When you do TYPE in the console on a file (or in CAT or any other OS), the contents of the file are interpreted as default text, because the TYPE programmer decided to write it like this.
When you write a program to read data from a file, you decide how to interpret the data you read.
, , , .