Background: I ran into a really odd issue where part of a php page just stopped parsing but only when it was uploaded to the server. Runs fine locally. The part where it cut off was after a commented line of code. Removed the comment it parsed up till the next comment.
Turns out the issue was line endings. They were CR only without a LF, and the server being *nix doesn't recognize CR alone as a new line, thus it interpreted the comment as extending to the entire rest of the file.
I tried creating a new file (after turning on "show all characters") inside Notepad++ and pressed enter. It showed CRLF.
Next I created a new text file in Windows explorer (Win7 x64) then opened it in Notepad++. I pressed enter and it only inserted CR not LF.
Now the actual question is why? As far as I know Windows should be based on CRLF not just CR. Also is there a way to have Notepad++ always use CRLF, or at least assume CRLF with a 0 byte file?