Line breaks are composed of "\r\n"
(Carriage Return + Line Feed) in Windows operating systems, while in *NIX they are composed of only "\n"
. This is why it works in your mobile phone, which is likely to be running on the Linux kernel, while on your Windows machine it doesn't.
There is no real harm to saving newlines as "\r\n"
instead of just "\n"
, this will display correctly on both Windows and Linux operating systems.
The Wikipedia article on Newlines provides good information about this matter.
Here is a handy list of text editors, along with their newline support. You can use an editor that supports UNIX newlines without making changes to the file.