dafoki
asked on
text files
i'm working on a text file convertor, converting unix text files to windows text files and vice versa.
i know that the windows use carriage return (CR) and a line feed (LF) - to mark the end of the line
and unix uses only CR
first of all, am i wrong?
is CR - \n ?
and LF - \r ?
i know that the windows use carriage return (CR) and a line feed (LF) - to mark the end of the line
and unix uses only CR
first of all, am i wrong?
is CR - \n ?
and LF - \r ?
almost right. DOS = CR + LF, Unix = LF only.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
one more thing:
is CR = \n ?
and NF = \r ?
and in windows does it come \r\n or \n\r ?
is CR = \n ?
and NF = \r ?
and in windows does it come \r\n or \n\r ?
yes, but you can check it all in the source code whose URL was provided.
Happy coding,
~Graham();
Happy coding,
~Graham();