I have some FORTRAN code that opens a file with FORM = 'FORMATTED', STATUS = 'UNKNOWN', RECL = 1024, CARRIAGECONTROL = 'LIST'. I write out some formatted records.
I can open my file in Notepad, which seems happy that the content it text (or at least, can be displayed as text).
If I use DevStudio to try to open the file, specifying the type as Text, DevStudio claims the file is binary and won't open it (it will open it as binary).
If I then open the file in Notepad, save it and close it, I can then open it in DevStudio as text.
I checked and the file does not change size in any way, even by a byte. So how does DevStudio determine the type of the contents of a file? And why does it 'get it wrong'?
Of course, Notepad is probably displaying a binary file as text (as it always tries to do), it just so happens that the binary is text...