Toshi
Toshi

Reputation: 6342

2 line breaks automatically added

I code in php, and put the code on the server. But my peers pointed out I put the Line breaks too many times. And with his pc ,I looked through the code which I already posted on the server. (I use mac.) There are a lot of extra line breaks added automatically. However I didn't put that many line breaks. I guess If I put one line break, something would converts it to two line breaks somehow. In my environment, I can see exactly the same as I type. I guess there could be some compatibility problems between his and mine.

I use : Mac os x, SublimeText2, Yummy FTP.

He uses : Windows 7, SublimeText2, WinSCP.

I searched but I couldn't find exact answer. Any ideas?

Upvotes: 0

Views: 58

Answers (1)

user873592
user873592

Reputation: 226

This is caused be different line ending. Mac OS X uses Unix convention of a new line, Windows uses carriage return, linefeed at the end of lines.

Open a file in a hex editor to see these characters.

You can convert the text to the platforms convention. There are tools for this. Some editors can handle the different endings.

Upvotes: 1

Related Questions