General discussion

Locked

DOS Carriage Return/Line Feed

By rcain ·
I am told that a DOS file that I am attempting to submit is missing the carriage return and line feeds. How can I verify they are missing and how can I insert them?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by dryflies In reply to DOS Carriage Return/Line ...

There are two ways. But first make a copy of the file incase one of these does not work.
The easiest is to open the file in notepad, hit the enter key, and then save the file. Make sure you use save, not save as.
The second method would be to open the file in a binary editor and insert the carriage return and line feed at the approrpiate place. to do that you would insert a 0x0d followed by a 0x0a. these represent the ascii codes for carriage return and line feed respectively. in decimal they are the numbers 13 and 10.

Collapse -

by rcain In reply to

Poster rated this answer.

Collapse -

by ahar In reply to DOS Carriage Return/Line ...

get the vim Editor at www.vim.org
there you can set the fileformat to dos, unix or mac
IMHO vim is the allpurpose editor for (almost) all platforms especially for developers

Collapse -

by rcain In reply to

Poster rated this answer.

Collapse -

by rcain In reply to DOS Carriage Return/Line ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums