Reply To: Determining file type (DOS,UNIX,BINARY)

Product Compare Forums Multi-Edit Support Determining file type (DOS,UNIX,BINARY) Reply To: Determining file type (DOS,UNIX,BINARY)

#3021
AndyColson
Participant

So far, Ive found ‘Line_Terminator’. it is a string that contains the, well, line terminator… however, trying to determine the file type has proven beyond my abilities….. :-)

this code works for dos
[code:4iy8alya]
if ( Line_Terminator == "\r\n" ) {
make_message(’dos’);
}
[/code:4iy8alya]

This does not work for unix:
[code:4iy8alya]
if ( Line_Terminator == "\n" ) {
make_message(’unix’);
}
[/code:4iy8alya]

I do not know why. As for converting… I dont know yet.

-Andy