Re: Problems with end-of-line in UK files
| From: | Костя Третяк | Date: | Thu, 18 Sep 2014 08:43:45 +0000 |
| Subject: | Re: Problems with end-of-line in UK files | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969385184@lists.php.net to get a copy of this message | ||
Hi
I'm ashamed of it. Before each commit I replaced the regular expression
"\r\n" to "\n" in NetBeans. But yesterday, in order to remove empty
directories, I first entire folder UK an pushed on hithub, and then pulled.
Then, unfortunately, did not check exist "\r\n"because I thought that
hithub came back that I had sent. It can now be seen that the difference in
the end of the line is ignored.
Sorry.
2014-09-18 9:43 GMT+03:00 Simion Onea <simionea@gmail.com>:
> 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.
>
>