Is it possible to read a binary file and write it to a text file? For instance, specify source and destination file names, read the source binary file, and write it as a text report to another file? All of this without displaying it on the screen. Thanks.
Not exactly sure what do you want to do. But it is possible to open a file in one format and write it in another format. However, there are a few notes
1. A text file only consist of a subset of all possible binary characters - all lower printable ASCII and some control characters.
2. Open the file in text mode causes the read/write operation to perform 'translation' when reading/writing the file. And the kind of translations are system dependent.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.