Home >Backend Development >PHP Tutorial >What is the difference between text files and binary files
For example, if "abcd" is stored in a text file, what is the binary form stored? If it is stored as a binary file, what is the binary form stored? I hope you can give an example
Encoding is only related to storage and has nothing to do with calculation, right?
For example, 2 is a certain value when stored in ASCII, and is given an integer of 4 bytes during calculation 10
For example, if "abcd" is stored in a text file, what is the binary form stored? If it is stored as a binary file, what is the binary form stored? I hope you can give an example
Encoding is only related to storage and has nothing to do with calculation, right?
For example, 2 is a certain value when stored in ASCII, and is given an integer of 4 bytes during calculation 10
Brother is really asking a lot of questions related to binary and encoding, why not ask them together...
All files are essentially the same and are stored in binary. The reason why text files and binary files are distinguished is that text files are mainly used for people to read, so they focus on being readable, and they specifically carry information indicating their own text encoding. In addition, the distinction between text files and binary files is also to inform users that text files can be edited with an ordinary text editor, while binary files are best not to be edited with a text editor.