"Bruno van Dooren" <br**********************@hotmail.com> wrote in message
news:et**************@TK2MSFTNGP09.phx.gbl...
i am working a some C++ software that will run both on windows and linux.
development is done on windows with VS .NET 2003.
when i view and edit source files on linux (using Vim), all windows
source files are littered with ^m characters everywhere.
why does the VS editor do this, and what can i do to make it stop doing
it?
Ctrl-m is a carriage-return (13. == 0xD).
<background ramble>
In the dark old days of teletypes and such, one character - the carriage
return - moved the print-head to the left-most spot, and another - the line
feed (ctrl/j, 10. = 0xA) moved the paper up one click. Some environments use
both characters written "\r\n" C and C++ to signify the end of line.
</background ramble>
Any decent utitility to copy text between platforms should be able to map
"\r\n" to "\n" and vice versa.
It is folly, though, to assume that either platform is wrong not to adopt
the convention of the other.
Regards,
Will