Problems with end-of-line in UK files
| From: | Simion Onea | Date: | Thu, 18 Sep 2014 06:43:22 +0000 |
| Subject: | Problems with end-of-line in UK files | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969385183@lists.php.net to get a copy of this message | ||
Hi!
I also noticed that all the files in the UK tree have the Windows-style
end-of-line characters.
But the documentation team has convened to use UNIX-style end-of-lines.
What is it all about? It is about how lines are terminated in textual files
in different OS-es:
- Linux and other UNIX-es use LF to terminate lines
- MacOS uses (or used) CR to terminate lines
- Windows, DOS uses CR+LF to terminate lines
You can read about it in the article http://en.wikipedia.org/wiki/Newline
So if you transfer a textual file edited in Windows to a Linux system and
try to view it, you will notice an extra "CR" at the end of lines, which is
not good.
What can be done now?
You should convert the EOL styles from Windows to UNIX. To do this, there
is a package and a command in Linux -- "dos2unix".
And if you would like to continue editing files in Windows, you can use an
editor like "Notepad++". It handles very well all kinds of EOL styles and
all kinds of character encodings. And it can do conversions between them.
If you want, I can help you with the conversion of the existing files in
the repository (and also adding necessary SVN properties). As Chris said,
there are tools in Linux to do operations "in bulk".
Regards,
Simion.