Link to home
Start Free TrialLog in
Avatar of dafoki
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 ?
Avatar of graham_k
graham_k

almost right. DOS = CR + LF, Unix = LF only.
ASKER CERTIFIED SOLUTION
Avatar of graham_k
graham_k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dafoki

ASKER

one more thing:
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();