Questions tagged [eol]

EOL is short for "end of line". In text files each line is terminated with characters such as linefeed or carriage return or a combination thereof.

EOL stands for "end of line" and refers to the various character or combination of characters that signify the end of each line of a text-based file.

For historical reasons there are various common EOLs:

  • linefeed or newline, ASCII 0x0A: common on systems with Unix heritage including Mac OS X
  • carriage return + linefeed, ASCII 0x0D 0x0A: common on systems with Microsoft DOS and Windows heritage and in text-based internet protocols
  • carriage return, ASCII 0x0D: used on Apple Macintosh up to System 7

These differences can present problems when using files and source code on multiple operating systems. Issues may be encountered with text editors, compilers, and revision controls systems.

See also

380 questions
7
votes
2 answers

How to clean up line-endings with Git

I'm quite inexperienced with Git, and this one baffles me: I just switched my working copy to another branch (a simple git checkout master), and immediately after that, git status tells me about hundreds of changed files. However, it's all about…
Tobias
  • 2,481
  • 3
  • 26
  • 38
6
votes
1 answer

Convert the end of line pattern in a Mercurial repository

I have a repository that was populated with files with Windows end of line markers, but I intended to use the Unix EOL pattern. One option is to manually (dos2unix) change all the files, then commit a changeset that completely overwrites the…
Martin
  • 61
  • 1
6
votes
1 answer

Prevent Python print()'s automatic newline conversion to CRLF on Windows

I'd like to pipe text with unix-like EOL (LF) from Python via Windows CMD (console). However, Python seems to automatically convert single newlines into Windows-style end-of-line (EOL) characters (i.e. \r\n, , 0D 0A, 13…
handle
  • 5,859
  • 3
  • 54
  • 82
6
votes
2 answers

why does git treat some cpp files as binary?

here's output of git log : * 5a831fdb34f05edd62321d1193a96b8f96486d69 HEAD (HEAD, origin/work, work) | LIB/xxx.cpp | Bin 592994 -> 593572 bytes | LIB/xxx.h | 5 +++++ | LIB/bbb/xxx.h …
stijn
  • 34,664
  • 13
  • 111
  • 163
6
votes
1 answer

Is there any EOL( end of life) and EOVS( end of vendor support) dates for spring libs?

Is there any EOL( end of life) and EOVS( end of vendor support) dates for spring libs like spring boot, spring cloud, spring session etc? If yes where can I find these information for each version of libs?
Sanket Gupta
  • 75
  • 1
  • 9
6
votes
9 answers

Is \n multi-character in C?

I read that \n consists of CR & LF. Each has their own ASCII codes. So is the \n in C represented by a single character or is it multi-character? Edit: Kindly specify your answer, rather than simply saying "yes, it is" or "no, it isn't"
user191776
6
votes
1 answer

vim: showing listchars changes the screen wrapping

I noted that when I show up the EOL listchars in a text the linebreaks are losen p.e. this is my text of this message becomes after set list ..eol this is my text of this mess age(EOL CHAR) I would like to see the EOL characters without…
remio
  • 175
  • 9
6
votes
1 answer

Using boost::spirit, how do I require part of a record to be on its own line?

I have a record parser that throws one of several exceptions to indicate which rule failed. Front matter: #include #include #include #include #include #include…
Greg Bacon
  • 134,834
  • 32
  • 188
  • 245
6
votes
1 answer

Prevent EOL normalization for CSV files

I have a source repository that is used both from Windows and Linux. I know that Git will automatically convert EOL to the local standard: \r\n on Windows and \n on Linux. This is not an issue for source files. But I have some CSV files that use a…
Pragmateek
  • 13,174
  • 9
  • 74
  • 108
6
votes
3 answers

Remove or replace LF from CSV file

I have some huge CSV files where sometimes the lines end with LF instead of CRLF, for example: pippo LF pluto CRLF I want to convert these two lines into a single line, like pippo pluto CRLF. I'm trying to do this in Notepad++ (Windows 7), but I'm…
Antonio
  • 367
  • 2
  • 4
  • 11
6
votes
2 answers

read data from file till end of line in C/C++

It is common to read until end of file, but I am interested in how could I read data (a series of numbers) from a text file until the end of a line? I got the task to read several series of numbers from a file, which are positioned in new lines.…
Eszter
  • 331
  • 1
  • 3
  • 19
6
votes
2 answers

Python bug - or my stupidity - EOL while scanning string literal

I cannot see a significant difference between the two following lines. Yet the first parses, and the latter, does not. In [5]: n=""" \\"Axis of Awesome\\" """ In [6]: n="""\\"Axis of Awesome\\"""" File "", line 1 …
Bryan Hunt
  • 3,685
  • 2
  • 24
  • 36
6
votes
2 answers

Set default line ending in Java

I'm working with Java in a multi-platform environment (Windows + Linux). Whatever text files we produce, however, should use LF as their EOL sequence. Is there a way I can force Java to use this EOL sequence regardless on the platform I'm running a…
user1313142
  • 61
  • 1
  • 3
5
votes
1 answer

Line endings are not following default settings in VS Code

When I try to push to GitHub, everytime I keep getting such warnings: warning: LF will be replaced by CRLF in app/bingey-api/models/user.js. The file will have its original line endings in your working directory Even though I changed my line…
vytaute
  • 1,260
  • 4
  • 16
  • 36
5
votes
2 answers

Line endings (also known as Newlines) in JS strings

It is well known, that Unix-like system uses LF characters for newlines, whereas Windows uses CR+LF. However, when I test this code from local HTML file on my Windows PC, it seems that JS treat all newlines as separated with LF. Is it correct…
john c. j.
  • 725
  • 5
  • 28
  • 81